mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-25 21:28:22 +01:00
Fix skia bug #10952
The offset *can* be negative, but the sanitizer reports strange address behaviour when row_offset is unsigned size_t. For safety, use int64_t instead (probably overkill. int32_t is probably ok). Change-Id: I1bd424bfdb5447b3839f40679581d6bdea075320
This commit is contained in:
parent
4b3c6953ef
commit
8870ba7f06
@ -465,7 +465,7 @@ static int EmitRescaledAlphaRGB(const VP8Io* const io, WebPDecParams* const p,
|
||||
int lines_left = expected_num_out_lines;
|
||||
const int y_end = p->last_y + lines_left;
|
||||
while (lines_left > 0) {
|
||||
const size_t row_offset = scaler->src_y - io->mb_y;
|
||||
const int64_t row_offset = (int64_t)scaler->src_y - io->mb_y;
|
||||
WebPRescalerImport(scaler, io->mb_h + io->mb_y - scaler->src_y,
|
||||
io->a + row_offset * io->width, io->width);
|
||||
lines_left -= p->emit_alpha_row(p, y_end - lines_left, lines_left);
|
||||
|
Loading…
Reference in New Issue
Block a user