diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-12-21 12:52:23 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-12-21 13:16:32 +0100 |
commit | 03acb035d1292685cc24a2be0f62dd8332711734 (patch) | |
tree | 0a9403874e5bf115c984f5012e5859c0d0b4268f /libavcodec | |
parent | 263105deebbd0a5737dfd1165668c7afb2cc870a (diff) | |
download | ffmpeg-03acb035d1292685cc24a2be0f62dd8332711734.tar.gz |
avcodec/vqavideo: clear uninitialized parts of the decode buffer
Fixes use of uninitialized memory
Fixes part of msan_uninit-mem_7f841fe2ab3b_4608_cow2_1.vqa
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/vqavideo.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/vqavideo.c b/libavcodec/vqavideo.c index d544ad8db2..913385520a 100644 --- a/libavcodec/vqavideo.c +++ b/libavcodec/vqavideo.c @@ -303,9 +303,11 @@ static int decode_format80(VqaContext *s, int src_size, * codebook entry; it is not important for compressed codebooks because * not every entry needs to be filled */ if (check_size) - if (dest_index < dest_size) + if (dest_index < dest_size) { av_log(s->avctx, AV_LOG_ERROR, "decode_format80 problem: decode finished with dest_index (%d) < dest_size (%d)\n", dest_index, dest_size); + memset(dest + dest_index, 0, dest_size - dest_index); + } return 0; // let's display what we decoded anyway } |