aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mpegts.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-19 04:42:59 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-12-19 04:43:41 +0100
commit6781ec6714329da32b2e08be78e951ad1eb71534 (patch)
treed3cb318b44ea119491db85d3c1368516f436a237 /libavformat/mpegts.c
parent5a1cd796e22473e1e64c4981720b0a09e2e9a13d (diff)
parent8b263331c5ebbb10b6ea521e9fd56751ba94254b (diff)
downloadffmpeg-6781ec6714329da32b2e08be78e951ad1eb71534.tar.gz
Merge commit '8b263331c5ebbb10b6ea521e9fd56751ba94254b'
* commit '8b263331c5ebbb10b6ea521e9fd56751ba94254b': mpegts: check get16() return value Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mpegts.c')
-rw-r--r--libavformat/mpegts.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 74ae4fafe4..f7f484e133 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -1555,6 +1555,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++)
@@ -1573,7 +1575,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 || st->request_probe > 0) &&
mp4_descr->dec_config_descr_len && mp4_descr->es_id == pid) {