mp4: Don't read an empty Decoder Config Descriptor
(cherry picked from commit 1c2e07b811)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
committed by
Reinhard Tartler
parent
000bd5209f
commit
684f671f28
@@ -395,7 +395,7 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext
|
|||||||
len = ff_mp4_read_descr(fc, pb, &tag);
|
len = ff_mp4_read_descr(fc, pb, &tag);
|
||||||
if (tag == MP4DecSpecificDescrTag) {
|
if (tag == MP4DecSpecificDescrTag) {
|
||||||
av_dlog(fc, "Specific MPEG4 header len=%d\n", len);
|
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;
|
return -1;
|
||||||
av_free(st->codec->extradata);
|
av_free(st->codec->extradata);
|
||||||
st->codec->extradata = av_mallocz(len + FF_INPUT_BUFFER_PADDING_SIZE);
|
st->codec->extradata = av_mallocz(len + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||||
|
|||||||
Reference in New Issue
Block a user