Skip to content

Commit

Permalink
fixed potential crash in adts reframer with broken streams - cf #1723
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanlf committed Mar 29, 2021
1 parent 51cdb67 commit 22774aa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/filters/reframe_adts.c
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,12 @@ GF_Err adts_dmx_process(GF_Filter *filter)
break;
}

if (ctx->hdr.frame_size < ctx->hdr.hdr_size) {
GF_LOG(GF_LOG_WARNING, GF_LOG_PARSER, ("[ADTSDmx] Corrupted ADTS frame header, resyncing\n"));
ctx->nb_frames = 0;
goto drop_byte;
}

adts_dmx_check_pid(filter, ctx);

if (!ctx->is_playing) {
Expand Down

0 comments on commit 22774aa

Please sign in to comment.