diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-12-23 18:09:58 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-12-26 13:53:15 +0100 |
commit | 14bec7dcf8299f35fff1e2158c6cb8c6d6b2e083 (patch) | |
tree | 4c8039cb98d69a1a0ba54cc8a91c0090f722cd42 /libavcodec/wnv1.c | |
parent | ec73bd1fe876b4bd9f061863f86ad57043a47ade (diff) | |
download | ffmpeg-14bec7dcf8299f35fff1e2158c6cb8c6d6b2e083.tar.gz |
avcodec/wnv1: clear padding area of rbuf
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7faa48586020_2145_MAILTEST.AVI
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/wnv1.c')
-rw-r--r-- | libavcodec/wnv1.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/wnv1.c b/libavcodec/wnv1.c index d8532e4b16..99aee3cd1c 100644 --- a/libavcodec/wnv1.c +++ b/libavcodec/wnv1.c @@ -78,6 +78,7 @@ static int decode_frame(AVCodecContext *avctx, av_log(avctx, AV_LOG_ERROR, "Cannot allocate temporary buffer\n"); return AVERROR(ENOMEM); } + memset(rbuf + buf_size, 0, FF_INPUT_BUFFER_PADDING_SIZE); if ((ret = ff_get_buffer(avctx, p, 0)) < 0) { av_free(rbuf); |