Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
isra17 committed Jul 20, 2022
1 parent 8485bac commit 0c339f2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion nrs/ext/bzlib/decompress.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,14 @@ Int32 NSISCALL BZ2_decompress ( DState* s )
j++;
if (j >= nGroups) RETURN(BZ_DATA_ERROR);
}
s->selectorMtf[i] = j;
/* Having more than BZ_MAX_SELECTORS doesn't make much sense
since they will never be used, but some implementations might
"round up" the number of selectors, so just ignore those. */
if (i < BZ_MAX_SELECTORS)
s->selectorMtf[i] = j;
}
if (nSelectors > BZ_MAX_SELECTORS)
nSelectors = BZ_MAX_SELECTORS;

/*--- Undo the MTF values for the selectors. ---*/
{
Expand Down

0 comments on commit 0c339f2

Please sign in to comment.