summaryrefslogtreecommitdiffstats
path: root/libavcodec/nuv.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-18 18:14:24 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-12-18 18:15:15 +0100
commit4a2570f50a2f348972ec8a58bb79bf5b0dd1b7ea (patch)
treec5e87b62cd633d68552cb7f14c6bae260e99e7b5 /libavcodec/nuv.c
parent1935173fd1decb494300bf96b507419aae2b116a (diff)
downloadffmpeg-streaming-4a2570f50a2f348972ec8a58bb79bf5b0dd1b7ea.zip
ffmpeg-streaming-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>
Diffstat (limited to 'libavcodec/nuv.c')
-rw-r--r--libavcodec/nuv.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/nuv.c b/libavcodec/nuv.c
index d4d9318..358bf05 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;
OpenPOWER on IntegriCloud