Commit d28c772c authored by astrange's avatar astrange

Allocate and clear FF_INPUT_BUFFER_PADDING bytes at the end of mkv extradata.

Fixes valgrind invalid read warnings during H.264 extradata parsing.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@16229 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 61bd4039
......@@ -1304,7 +1304,8 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
st->codec->extradata = extradata;
st->codec->extradata_size = extradata_size;
} else if(track->codec_priv.data && track->codec_priv.size > 0){
st->codec->extradata = av_malloc(track->codec_priv.size);
st->codec->extradata = av_mallocz(track->codec_priv.size +
FF_INPUT_BUFFER_PADDING_SIZE);
if(st->codec->extradata == NULL)
return AVERROR(ENOMEM);
st->codec->extradata_size = track->codec_priv.size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment