Skip to content

Commit

Permalink
prevent endless loop for #434 input
Browse files Browse the repository at this point in the history
  • Loading branch information
farindk committed Nov 23, 2023
1 parent 6056390 commit 7e4faf2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libde265/slice.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2582,6 +2582,11 @@ static int decode_rqt_root_cbf(thread_context* tctx)

static int decode_ref_idx_lX(thread_context* tctx, int numRefIdxLXActive)
{
// prevent endless loop when 'numRefIdxLXActive' is invalid
if (numRefIdxLXActive <= 1) {
return 0;
}

logtrace(LogSlice,"# ref_idx_lX\n");

int cMax = numRefIdxLXActive-1;
Expand Down

0 comments on commit 7e4faf2

Please sign in to comment.