Mercurial > libavformat.hg
changeset 4124:c8318261427d libavformat
Allocate and clear FF_INPUT_BUFFER_PADDING_SIZE bytes at the end of mkv
extradata.
Fixes valgrind invalid read warnings during H.264 extradata parsing.
author | astrange |
---|---|
date | Fri, 19 Dec 2008 01:00:44 +0000 |
parents | e536841c1aeb |
children | df6989f6122b |
files | matroskadec.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/matroskadec.c Thu Dec 18 09:18:43 2008 +0000 +++ b/matroskadec.c Fri Dec 19 01:00:44 2008 +0000 @@ -1304,7 +1304,8 @@ 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;