Skip to content

Commit 7e4faf2

Browse files
committed
prevent endless loop for #434 input
1 parent 6056390 commit 7e4faf2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libde265/slice.cc

+5
Original file line numberDiff line numberDiff line change
@@ -2582,6 +2582,11 @@ static int decode_rqt_root_cbf(thread_context* tctx)
25822582

25832583
static int decode_ref_idx_lX(thread_context* tctx, int numRefIdxLXActive)
25842584
{
2585+
// prevent endless loop when 'numRefIdxLXActive' is invalid
2586+
if (numRefIdxLXActive <= 1) {
2587+
return 0;
2588+
}
2589+
25852590
logtrace(LogSlice,"# ref_idx_lX\n");
25862591

25872592
int cMax = numRefIdxLXActive-1;

0 commit comments

Comments
 (0)