Commit c61c8536 authored by Michael Niedermayer's avatar Michael Niedermayer

lavf/bintext: allocate FF_INPUT_BUFFER_PADDING_SIZE for extradata

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent eae983f4
...@@ -151,7 +151,7 @@ static int bintext_read_header(AVFormatContext *s) ...@@ -151,7 +151,7 @@ static int bintext_read_header(AVFormatContext *s)
st->codec->codec_id = CODEC_ID_BINTEXT; st->codec->codec_id = CODEC_ID_BINTEXT;
st->codec->extradata_size = 2; 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) if (!st->codec->extradata)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
st->codec->extradata[0] = 16; st->codec->extradata[0] = 16;
...@@ -208,7 +208,7 @@ static int xbin_read_header(AVFormatContext *s) ...@@ -208,7 +208,7 @@ static int xbin_read_header(AVFormatContext *s)
st->codec->extradata_size += fontheight * (flags & 0x10 ? 512 : 256); st->codec->extradata_size += fontheight * (flags & 0x10 ? 512 : 256);
st->codec->codec_id = flags & 4 ? CODEC_ID_XBIN : CODEC_ID_BINTEXT; 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) if (!st->codec->extradata)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
st->codec->extradata[0] = fontheight; st->codec->extradata[0] = fontheight;
...@@ -242,7 +242,7 @@ static int adf_read_header(AVFormatContext *s) ...@@ -242,7 +242,7 @@ static int adf_read_header(AVFormatContext *s)
st->codec->codec_id = CODEC_ID_BINTEXT; st->codec->codec_id = CODEC_ID_BINTEXT;
st->codec->extradata_size = 2 + 48 + 4096; 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) if (!st->codec->extradata)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
st->codec->extradata[0] = 16; st->codec->extradata[0] = 16;
...@@ -299,7 +299,7 @@ static int idf_read_header(AVFormatContext *s) ...@@ -299,7 +299,7 @@ static int idf_read_header(AVFormatContext *s)
st->codec->codec_id = CODEC_ID_IDF; st->codec->codec_id = CODEC_ID_IDF;
st->codec->extradata_size = 2 + 48 + 4096; 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) if (!st->codec->extradata)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
st->codec->extradata[0] = 16; st->codec->extradata[0] = 16;
......
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