Skip to content

Commit

Permalink
check num_tracks bound (#880)
Browse files Browse the repository at this point in the history
  • Loading branch information
iwashiira committed Jun 5, 2024
1 parent cb04552 commit 9565fe6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tsMuxer/movDemuxer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1137,6 +1137,8 @@ int MovDemuxer::mov_read_trex(MOVAtom atom)
int MovDemuxer::mov_read_trak(MOVAtom atom)
{
const auto sc = new MOVStreamContext();
if (num_tracks >= MAX_STREAMS)
THROW(ERR_COMMON, "too many trak detected")
Track* st = tracks[num_tracks] = sc;
num_tracks++;
st->type = IOContextTrackType::DATA;
Expand Down

0 comments on commit 9565fe6

Please sign in to comment.