diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-11-13 01:27:35 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-11-13 01:27:35 +0000 |
commit | 3129cd0140b15b80f3e7106f308ce19226ef0b1d (patch) | |
tree | ad5a8bd791f5ae7e0cefd246a564b2cd35a22b84 /libavformat/mov.c | |
parent | 4940ed6ae12e47a6cab496c3f32326fc39ab4b7b (diff) | |
download | ffmpeg-3129cd0140b15b80f3e7106f308ce19226ef0b1d.tar.gz |
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/mov.c')
-rw-r--r-- | libavformat/mov.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index b0f4b8bf6b..2b05b9486f 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -569,7 +569,7 @@ static int mov_read_esds(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom) #ifdef DEBUG av_log(NULL, AV_LOG_DEBUG, "Specific MPEG4 header len=%d\n", len); #endif - st->codec.extradata = (uint8_t*) av_mallocz(len); + st->codec.extradata = (uint8_t*) av_mallocz(len + FF_INPUT_BUFFER_PADDING_SIZE); if (st->codec.extradata) { get_buffer(pb, st->codec.extradata, len); st->codec.extradata_size = len; @@ -680,7 +680,7 @@ static int mov_read_smi(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom) // this should be fixed and just SMI header should be passed av_free(st->codec.extradata); st->codec.extradata_size = 0x5a + atom.size; - st->codec.extradata = (uint8_t*) av_mallocz(st->codec.extradata_size); + st->codec.extradata = (uint8_t*) av_mallocz(st->codec.extradata_size + FF_INPUT_BUFFER_PADDING_SIZE); if (st->codec.extradata) { strcpy(st->codec.extradata, "SVQ3"); // fake |