diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 981dd8cf0d..6007605b87 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -2412,7 +2412,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len // something else is broken, exit the program_descriptors_loop break; program_info_length -= len; - if (tag == IOD_DESCRIPTOR) { + if (tag == IOD_DESCRIPTOR && len >= 2) { get8(&p, p_end); // scope get8(&p, p_end); // label len -= 2;