diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-12-18 18:14:24 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-12-18 18:15:15 +0100 |
commit | 4a2570f50a2f348972ec8a58bb79bf5b0dd1b7ea (patch) | |
tree | c5e87b62cd633d68552cb7f14c6bae260e99e7b5 | |
parent | 1935173fd1decb494300bf96b507419aae2b116a (diff) | |
download | ffmpeg-4a2570f50a2f348972ec8a58bb79bf5b0dd1b7ea.tar.gz |
avcodec/nuv: zero buffer padding
Fixes use of uninitialized memory
Fixes msan_uninit-mem_7f4a141261de_7405_nirvana.nuv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/nuv.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/nuv.c b/libavcodec/nuv.c index d4d9318bf7..358bf0567c 100644 --- a/libavcodec/nuv.c +++ b/libavcodec/nuv.c @@ -218,6 +218,7 @@ retry: } buf = c->decomp_buf; buf_size = c->decomp_size - FFMAX(FF_INPUT_BUFFER_PADDING_SIZE, AV_LZO_OUTPUT_PADDING) - outlen; + memset(c->decomp_buf + buf_size, 0, FF_INPUT_BUFFER_PADDING_SIZE); } if (c->codec_frameheader) { int w, h, q; |