diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-12-28 03:41:29 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-12-28 03:42:40 +0100 |
commit | 8efde6d80c94e6069d4fc19e5ef88a2946a2e51c (patch) | |
tree | efeab7d05733ccb47c66da9bdb8c2966d1ba5e26 | |
parent | 4156df59f59626f60186a4effed80f60c9c4e8cc (diff) | |
download | ffmpeg-8efde6d80c94e6069d4fc19e5ef88a2946a2e51c.tar.gz |
avformat/mov: clear padding area in mov_read_extradata()
Fixes: msan_uninit-mem_7f58816b71e3_7025_mov_svq3___svq3_weird_prediction2.mov
Fixes use of uninitialized memory
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/mov.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index be602ee652..8dc60624c1 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1010,6 +1010,7 @@ static int mov_read_extradata(MOVContext *c, AVIOContext *pb, MOVAtom atom, av_log(c->fc, AV_LOG_WARNING, "truncated extradata\n"); st->codec->extradata_size -= atom.size - err; } + memset(buf + 8 + err, 0, FF_INPUT_BUFFER_PADDING_SIZE); return 0; } |