mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 06:08:21 +01:00
Fix a boundary case in BackwardReferencesHashChainDistanceOnly.
The optimization for (len != MIN_LENGTH) actually only holds for (len > MIN_LENGTH) but (len < MIN_LENGTH) can now happen as len can be changed in the loop before. Change-Id: I3f9f91a540206c80385c5fba96c3d64ab9536752
This commit is contained in:
parent
cfbcc5ece0
commit
0174d18d8b
@ -1240,7 +1240,7 @@ static int BackwardReferencesHashChainDistanceOnly(
|
||||
}
|
||||
goto next_symbol;
|
||||
}
|
||||
if (len != MIN_LENGTH) {
|
||||
if (len > MIN_LENGTH) {
|
||||
int code_min_length;
|
||||
double cost_total;
|
||||
offset = HashChainFindOffset(hash_chain, i);
|
||||
|
Loading…
Reference in New Issue
Block a user