mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-26 05:38:22 +01:00
Check all the rows.
A 3 by 1 image would not have its 1st and 3rd lines compared at the second iteration. BUG=oss-fuzz:69208 Change-Id: I9213e73995d31907f358310a0b7d5ebb21c1f8b2
This commit is contained in:
parent
7ec51c5916
commit
ee26766a89
@ -483,7 +483,7 @@ static void OptimizeSampling(uint32_t* const image, int full_width,
|
||||
const int new_square_size = 1 << (best_bits + 1 - bits);
|
||||
int is_good = 1;
|
||||
square_size = 1 << (best_bits - bits);
|
||||
for (y = 0; y + new_square_size <= height; y += new_square_size) {
|
||||
for (y = 0; y + square_size < height; y += new_square_size) {
|
||||
// Check the first lines of consecutive line groups.
|
||||
if (memcmp(&image[y * width], &image[(y + square_size) * width],
|
||||
width * sizeof(*image)) != 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user