Skip to content

Commit d067ab3

Browse files
committed
mpeg2ts: add section size check (#2395)
1 parent 1b77837 commit d067ab3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: src/media_tools/mpegts.c

+5
Original file line numberDiff line numberDiff line change
@@ -946,6 +946,11 @@ static void gf_m2ts_process_tdt_tot(GF_M2TS_Demuxer *ts, GF_M2TS_SECTION_ES *tdt
946946
return;
947947
}
948948

949+
if (data_size < 5) {
950+
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[MPEG-2 TS] Section data size too small to read date (len: %u)\n", data_size));
951+
return;
952+
}
953+
949954
/*UTC_time - see annex C of DVB-SI ETSI EN 300468*/
950955
/* decodes an Modified Julian Date (MJD) into a Co-ordinated Universal Time (UTC)
951956
See annex C of DVB-SI ETSI EN 300468 */

0 commit comments

Comments
 (0)