diff --git a/pixman/pixman-bits-image.c b/pixman/pixman-bits-image.c index 75a39a1..489ab16 100644 --- a/pixman/pixman-bits-image.c +++ b/pixman/pixman-bits-image.c @@ -199,7 +199,7 @@ bits_image_fetch_bilinear_no_repeat_8888 (pixman_iter_t *iter, } else { - top_row = bits->bits + y1 * bits->rowstride; + top_row = bits->bits + (size_t)y1 * bits->rowstride; x_top = x; ux_top = ux; } @@ -212,7 +212,7 @@ bits_image_fetch_bilinear_no_repeat_8888 (pixman_iter_t *iter, } else { - bottom_row = bits->bits + y2 * bits->rowstride; + bottom_row = bits->bits + (size_t)y2 * bits->rowstride; x_bottom = x; ux_bottom = ux; } @@ -822,7 +822,7 @@ bits_image_fetch_separable_convolution_affine (pixman_image_t * image, repeat (repeat_mode, &rx, bits->width); repeat (repeat_mode, &ry, bits->height); - row = (uint8_t *)bits->bits + bits->rowstride * 4 * ry; + row = (uint8_t *)bits->bits + (size_t)bits->rowstride * 4 * ry; pixel = convert_pixel (row, rx) | mask; } else @@ -833,7 +833,7 @@ bits_image_fetch_separable_convolution_affine (pixman_image_t * image, } else { - row = (uint8_t *)bits->bits + bits->rowstride * 4 * ry; + row = (uint8_t *)bits->bits + (size_t)bits->rowstride * 4 * ry; pixel = convert_pixel (row, rx) | mask; } } @@ -935,8 +935,8 @@ bits_image_fetch_bilinear_affine (pixman_image_t * image, repeat (repeat_mode, &x2, width); repeat (repeat_mode, &y2, height); - row1 = (uint8_t *)bits->bits + bits->rowstride * 4 * y1; - row2 = (uint8_t *)bits->bits + bits->rowstride * 4 * y2; + row1 = (uint8_t *)bits->bits + (size_t)bits->rowstride * 4 * y1; + row2 = (uint8_t *)bits->bits + (size_t)bits->rowstride * 4 * y2; tl = convert_pixel (row1, x1) | mask; tr = convert_pixel (row1, x2) | mask; @@ -971,7 +971,7 @@ bits_image_fetch_bilinear_affine (pixman_image_t * image, } else { - row1 = (uint8_t *)bits->bits + bits->rowstride * 4 * y1; + row1 = (uint8_t *)bits->bits + (size_t)bits->rowstride * 4 * y1; row1 += bpp / 8 * x1; mask1 = PIXMAN_FORMAT_A (format)? 0 : 0xff000000; @@ -984,7 +984,7 @@ bits_image_fetch_bilinear_affine (pixman_image_t * image, } else { - row2 = (uint8_t *)bits->bits + bits->rowstride * 4 * y2; + row2 = (uint8_t *)bits->bits + (size_t)bits->rowstride * 4 * y2; row2 += bpp / 8 * x1; mask2 = PIXMAN_FORMAT_A (format)? 0 : 0xff000000; @@ -1082,7 +1082,7 @@ bits_image_fetch_nearest_affine (pixman_image_t * image, repeat (repeat_mode, &y0, height); } - row = (uint8_t *)bits->bits + bits->rowstride * 4 * y0; + row = (uint8_t *)bits->bits + (size_t)bits->rowstride * 4 * y0; buffer[i] = convert_pixel (row, x0) | mask; } @@ -1695,7 +1695,7 @@ create_bits (pixman_format_code_t format, if (_pixman_multiply_overflows_size (height, stride)) return NULL; - buf_size = height * stride; + buf_size = (size_t)height * stride; if (rowstride_bytes) *rowstride_bytes = stride;