summaryrefslogtreecommitdiff
path: root/libavformat/oggparsetheora.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-15 19:21:02 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-12-15 19:21:48 +0100
commit45115315820a14d0c3f836adafb879475736e750 (patch)
treeb0466212d37a583f189a126b67b7a81ca722ad58 /libavformat/oggparsetheora.c
parente838c9852e6f0a471a6917083e70e6fe238ba26a (diff)
downloadffmpeg-45115315820a14d0c3f836adafb879475736e750.tar.gz
avformat/oggparsetheora: zero extradata padding area
Fixes use of uninitialized memory Fixes: msan_uninit-mem_7f66fa0ac09d_9197_theora_a4_v6_k250_s0.ogg Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/oggparsetheora.c')
-rw-r--r--libavformat/oggparsetheora.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/oggparsetheora.c b/libavformat/oggparsetheora.c
index 6458b97bc0..59df17efba 100644
--- a/libavformat/oggparsetheora.c
+++ b/libavformat/oggparsetheora.c
@@ -131,6 +131,8 @@ static int theora_header(AVFormatContext *s, int idx)
st->codec->extradata_size = 0;
return err;
}
+ memset(st->codec->extradata + cds, 0, FF_INPUT_BUFFER_PADDING_SIZE);
+
cdp = st->codec->extradata + st->codec->extradata_size;
*cdp++ = os->psize >> 8;
*cdp++ = os->psize & 0xff;