summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-01-26 17:22:34 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-01-26 17:23:41 +0100
commit1860c66c5460e21314202be3624768d7e1bf45b0 (patch)
treeeb31eeae01785143c0f065b359a4dc61abab6ade
parent5af569aa30b93f56344ea540936eb671760f568c (diff)
downloadffmpeg-streaming-1860c66c5460e21314202be3624768d7e1bf45b0.zip
ffmpeg-streaming-1860c66c5460e21314202be3624768d7e1bf45b0.tar.gz
matroskadec: increase padding on several more extradata allocations.
Inspired by: 5af569aa30b93f56344ea540936eb671760f568c by alex Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/matroskadec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 80ff938..b7f7740 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1503,7 +1503,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
extradata_size = 2;
} else if (codec_id == CODEC_ID_TTA) {
extradata_size = 30;
- extradata = av_mallocz(extradata_size);
+ extradata = av_mallocz(extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
if (extradata == NULL)
return AVERROR(ENOMEM);
ffio_init_context(&b, extradata, extradata_size, 1,
@@ -1642,7 +1642,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
av_dict_set(&st->metadata, "mimetype", attachements[j].mime, 0);
st->codec->codec_id = CODEC_ID_NONE;
st->codec->codec_type = AVMEDIA_TYPE_ATTACHMENT;
- st->codec->extradata = av_malloc(attachements[j].bin.size);
+ st->codec->extradata = av_malloc(attachements[j].bin.size + FF_INPUT_BUFFER_PADDING_SIZE);
if(st->codec->extradata == NULL)
break;
st->codec->extradata_size = attachements[j].bin.size;
OpenPOWER on IntegriCloud