diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-01-15 23:06:30 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-01-15 23:09:22 +0100 |
commit | 1a01dc83434fbdd1f6604c73afc022795bfb4783 (patch) | |
tree | 1035989e5515bc1dd14db379d5cae7094502e1d3 | |
parent | b90c71cc59ed7782b93da8b5f94af13634d14263 (diff) | |
download | ffmpeg-1a01dc83434fbdd1f6604c73afc022795bfb4783.tar.gz |
avcodec/pgssubdec: Use av_fast_padded_malloc() for rle buffer
Fixes: use of uninitialized memeory
Fixes: msan_uninit-mem_7fa421d0e222_1765_Girl_With_The_Dragon_Tattoo_2_23_56.mkv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/pgssubdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/pgssubdec.c b/libavcodec/pgssubdec.c index f45f0bfc87..71c367ce6f 100644 --- a/libavcodec/pgssubdec.c +++ b/libavcodec/pgssubdec.c @@ -232,7 +232,7 @@ static int parse_picture_segment(AVCodecContext *avctx, ctx->pictures[picture_id].w = width; ctx->pictures[picture_id].h = height; - av_fast_malloc(&ctx->pictures[picture_id].rle, &ctx->pictures[picture_id].rle_buffer_size, rle_bitmap_len); + av_fast_padded_malloc(&ctx->pictures[picture_id].rle, &ctx->pictures[picture_id].rle_buffer_size, rle_bitmap_len); if (!ctx->pictures[picture_id].rle) return -1; |