[FFmpeg-cvslog] avformat/oggparsetheora: zero extradata padding area

Michael Niedermayer git at videolan.org
Sun Dec 15 19:44:12 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Dec 15 19:21:02 2013 +0100| [45115315820a14d0c3f836adafb879475736e750] | committer: Michael Niedermayer

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 at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=45115315820a14d0c3f836adafb879475736e750
---

 libavformat/oggparsetheora.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/oggparsetheora.c b/libavformat/oggparsetheora.c
index 6458b97..59df17e 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;



More information about the ffmpeg-cvslog mailing list