summaryrefslogtreecommitdiff
path: root/libavformat/isom.c
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2011-09-21 15:26:35 -0700
committerAlex Converse <alex.converse@gmail.com>2011-09-22 10:09:04 -0700
commit1c2e07b8111b24f62b8d1bda62907848e34dfbcb (patch)
treec5d830d83bdeab5596d724569499eb2a9ccb70a9 /libavformat/isom.c
parent20e1829dad73b5093d95fc7d45776d40b2705635 (diff)
mp4: Don't read an empty Decoder Config Descriptor
Diffstat (limited to 'libavformat/isom.c')
-rw-r--r--libavformat/isom.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/isom.c b/libavformat/isom.c
index 48fd8e1452..896730c5a6 100644
--- a/libavformat/isom.c
+++ b/libavformat/isom.c
@@ -418,7 +418,7 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext
len = ff_mp4_read_descr(fc, pb, &tag);
if (tag == MP4DecSpecificDescrTag) {
av_dlog(fc, "Specific MPEG4 header len=%d\n", len);
- if((uint64_t)len > (1<<30))
+ if (!len || (uint64_t)len > (1<<30))
return -1;
av_free(st->codec->extradata);
st->codec->extradata = av_mallocz(len + FF_INPUT_BUFFER_PADDING_SIZE);