aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2014-12-17 14:53:41 +0100
committerVittorio Giovara <vittorio.giovara@gmail.com>2014-12-18 23:27:13 +0100
commit8b263331c5ebbb10b6ea521e9fd56751ba94254b (patch)
tree076728d86f3e4ee15641bc48f58de67ad425df48 /libavformat
parent430a8168594b3cb29f44141d4da88f2c642de06f (diff)
downloadffmpeg-8b263331c5ebbb10b6ea521e9fd56751ba94254b.tar.gz
mpegts: check get16() return value
And break flow of execution rather than exiting the function. CC: libav-stable@libav.org Bug-Id: CID 732186
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mpegts.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index b2ba9f74e2..1377d9ceb4 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -1343,6 +1343,8 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type
switch (desc_tag) {
case 0x1E: /* SL descriptor */
desc_es_id = get16(pp, desc_end);
+ if (desc_es_id < 0)
+ break;
if (ts && ts->pids[pid])
ts->pids[pid]->es_id = desc_es_id;
for (i = 0; i < mp4_descr_count; i++)
@@ -1361,7 +1363,8 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type
}
break;
case 0x1F: /* FMC descriptor */
- get16(pp, desc_end);
+ if (get16(pp, desc_end) < 0)
+ break;
if (mp4_descr_count > 0 &&
st->codec->codec_id == AV_CODEC_ID_AAC_LATM &&
mp4_descr->dec_config_descr_len && mp4_descr->es_id == pid) {