Partially revert "tinf_decode_symbol: Don't traverse past end of TINF_TREE->table and ->trans."
.. I do not have any testcases demonstrating that the range check of
the access to t->trans is necessary.
This partially reverts commit cc278f73b6.
This commit is contained in:
parent
4c50ea3f9e
commit
d901303671
1 changed files with 1 additions and 6 deletions
|
|
@ -272,12 +272,7 @@ static int tinf_decode_symbol(TINF_DATA *d, TINF_TREE *t)
|
|||
|
||||
} while (cur >= 0);
|
||||
|
||||
sum += cur;
|
||||
if (sum < 0 || sum >= TINF_ARRAY_SIZE(t->trans)) {
|
||||
return TINF_DATA_ERROR;
|
||||
}
|
||||
|
||||
return t->trans[sum];
|
||||
return t->trans[sum + cur];
|
||||
}
|
||||
|
||||
/* given a data stream, decode dynamic trees from it */
|
||||
|
|
|
|||
Loading…
Reference in a new issue