Skip to content

Commit

Permalink
add null guards on gf_isom_find_od_id_for_track() (fixes #2666)
Browse files Browse the repository at this point in the history
  • Loading branch information
aureliendavid committed Oct 26, 2023
1 parent d26236e commit 3809955
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/isomedia/media_odf.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,13 @@ u32 gf_isom_find_od_id_for_track(GF_ISOFile *file, u32 track)

i=0;
while ( (od_tk = (GF_TrackBox*)gf_list_enum(file->moov->trackList, &i))) {
if (!od_tk || !od_tk->Media || !od_tk->Media->handler || !od_tk->Media->information ||
!od_tk->Media->information->sampleTable || !od_tk->Media->information->sampleTable->SampleSize ) {

continue;
}


if (od_tk->Media->handler->handlerType != GF_ISOM_MEDIA_OD) continue;

for (j=0; j<od_tk->Media->information->sampleTable->SampleSize->sampleCount; j++) {
Expand Down

0 comments on commit 3809955

Please sign in to comment.