Skip to content

Commit

Permalink
fix: mpeg-ts invalid adapatation field length check
Browse files Browse the repository at this point in the history
  • Loading branch information
ireader committed Nov 26, 2022
1 parent dd0b1d5 commit 2e7aa99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libmpeg/source/mpeg-ts-dec.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ int ts_demuxer_input(struct ts_demuxer_t* ts, const uint8_t* data, size_t bytes)
}

assert(i <= bytes);
if (i >= bytes)
if (i + (pkhd.payload_unit_start_indicator ? 1 : 0) >= bytes)
return 0; // ignore
}

Expand Down

0 comments on commit 2e7aa99

Please sign in to comment.