1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 11:28:11 +00:00

LibGfx: Fix global-buffer-overflow in interlaced GIF decode

Regressed with 57e10eadac and immediately
caught by oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=30507
This commit is contained in:
Andreas Kling 2021-02-07 11:18:55 +01:00
parent 0c66e53544
commit 10420dee7e

View file

@ -404,7 +404,8 @@ static bool decode_frame(GIFLoadingContext& context, size_t frame_index)
if (interlace_pass < 4)
row = INTERLACE_ROW_OFFSETS[interlace_pass];
} else {
row += INTERLACE_ROW_STRIDES[interlace_pass];
if (interlace_pass < 4)
row += INTERLACE_ROW_STRIDES[interlace_pass];
}
} else {
++row;