[FFmpeg-cvslog] avcodec/shorten: clear bitstream buffer
Michael Niedermayer
git at videolan.org
Thu Dec 26 01:59:52 CET 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Dec 23 18:09:58 2013 +0100| [1486ed0815a1f175060fa412aa917accba67c060] | committer: Michael Niedermayer
avcodec/shorten: clear bitstream buffer
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f3ca95606fb_6393_luckynight-partial.shn
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1486ed0815a1f175060fa412aa917accba67c060
---
libavcodec/shorten.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c
index 2bd35d2..8b91ed3 100644
--- a/libavcodec/shorten.c
+++ b/libavcodec/shorten.c
@@ -432,6 +432,7 @@ static int shorten_decode_frame(AVCodecContext *avctx, void *data,
av_log(avctx, AV_LOG_ERROR, "error allocating bitstream buffer\n");
return AVERROR(ENOMEM);
}
+ memset(tmp_ptr, 0, s->allocated_bitstream_size);
s->bitstream = tmp_ptr;
}
More information about the ffmpeg-cvslog
mailing list