1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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>
This commit is contained in:
Michael Niedermayer 2013-12-15 19:21:02 +01:00
parent e838c9852e
commit 4511531582

View File

@ -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;