diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-12-23 18:09:58 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-12-26 01:35:00 +0100 |
commit | 1486ed0815a1f175060fa412aa917accba67c060 (patch) | |
tree | 380e56b82874c3df6c95898016f471d31e445dfc /libavcodec/shorten.c | |
parent | f371a4a57d481e1957038fdf81b6f9d3171e7824 (diff) | |
download | ffmpeg-1486ed0815a1f175060fa412aa917accba67c060.tar.gz |
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@gmx.at>
Diffstat (limited to 'libavcodec/shorten.c')
-rw-r--r-- | libavcodec/shorten.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c index 2bd35d22d0..8b91ed3645 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; } |