summaryrefslogtreecommitdiff
path: root/libavformat/ogg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-11-13 01:27:35 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-11-13 01:27:35 +0000
commit3129cd0140b15b80f3e7106f308ce19226ef0b1d (patch)
treead5a8bd791f5ae7e0cefd246a564b2cd35a22b84 /libavformat/ogg.c
parent4940ed6ae12e47a6cab496c3f32326fc39ab4b7b (diff)
allocate a few bytes more for extradata so the bitstream reader if its used by the codec for parsing extardata, doesnt read over the end
Originally committed as revision 3679 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/ogg.c')
-rw-r--r--libavformat/ogg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/ogg.c b/libavformat/ogg.c
index 00c9f3ffd0..e0a72306c9 100644
--- a/libavformat/ogg.c
+++ b/libavformat/ogg.c
@@ -196,7 +196,7 @@ static int ogg_read_header(AVFormatContext *avfcontext, AVFormatParameters *ap)
return -1;
}
codec->extradata_size+= 2 + op.bytes;
- codec->extradata= av_realloc(codec->extradata, codec->extradata_size);
+ codec->extradata= av_realloc(codec->extradata, codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
p= codec->extradata + codec->extradata_size - 2 - op.bytes;
*(p++)= op.bytes>>8;
*(p++)= op.bytes&0xFF;