mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 03:59:43 +00:00
protect malloc overflow
Originally committed as revision 12208 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
17871a02ad
commit
852859ff7c
@ -291,6 +291,8 @@ static int mov_read_esds(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
|
||||
len = mp4_read_descr(c, pb, &tag);
|
||||
if (tag == MP4DecSpecificDescrTag) {
|
||||
dprintf(c->fc, "Specific MPEG4 header len=%d\n", len);
|
||||
if((uint64_t)len > (1<<30))
|
||||
return -1;
|
||||
st->codec->extradata = av_mallocz(len + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||
if (!st->codec->extradata)
|
||||
return AVERROR(ENOMEM);
|
||||
|
Loading…
Reference in New Issue
Block a user