diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-06-09 14:36:41 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-06-09 14:36:41 +0200 |
commit | c61c8536ef42ebf9163da36609cb85562615b8ff (patch) | |
tree | a87d4309abaa8e639720363d6c8acb4e08dc7a4a /libavformat/bintext.c | |
parent | eae983f4ff683f75386732eaa0537aaa7c05ff39 (diff) | |
download | ffmpeg-c61c8536ef42ebf9163da36609cb85562615b8ff.tar.gz |
lavf/bintext: allocate FF_INPUT_BUFFER_PADDING_SIZE for extradata
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/bintext.c')
-rw-r--r-- | libavformat/bintext.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/bintext.c b/libavformat/bintext.c index 3fab3e4f57..58db3cf71a 100644 --- a/libavformat/bintext.c +++ b/libavformat/bintext.c @@ -151,7 +151,7 @@ static int bintext_read_header(AVFormatContext *s) st->codec->codec_id = CODEC_ID_BINTEXT; st->codec->extradata_size = 2; - st->codec->extradata = av_malloc(st->codec->extradata_size); + st->codec->extradata = av_malloc(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE); if (!st->codec->extradata) return AVERROR(ENOMEM); st->codec->extradata[0] = 16; @@ -208,7 +208,7 @@ static int xbin_read_header(AVFormatContext *s) st->codec->extradata_size += fontheight * (flags & 0x10 ? 512 : 256); st->codec->codec_id = flags & 4 ? CODEC_ID_XBIN : CODEC_ID_BINTEXT; - st->codec->extradata = av_malloc(st->codec->extradata_size); + st->codec->extradata = av_malloc(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE); if (!st->codec->extradata) return AVERROR(ENOMEM); st->codec->extradata[0] = fontheight; @@ -242,7 +242,7 @@ static int adf_read_header(AVFormatContext *s) st->codec->codec_id = CODEC_ID_BINTEXT; st->codec->extradata_size = 2 + 48 + 4096; - st->codec->extradata = av_malloc(st->codec->extradata_size); + st->codec->extradata = av_malloc(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE); if (!st->codec->extradata) return AVERROR(ENOMEM); st->codec->extradata[0] = 16; @@ -299,7 +299,7 @@ static int idf_read_header(AVFormatContext *s) st->codec->codec_id = CODEC_ID_IDF; st->codec->extradata_size = 2 + 48 + 4096; - st->codec->extradata = av_malloc(st->codec->extradata_size); + st->codec->extradata = av_malloc(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE); if (!st->codec->extradata) return AVERROR(ENOMEM); st->codec->extradata[0] = 16; |