Skip to content

Commit cd249d5

Browse files
committed
increase width_padding assert to 10M
I've personally hit the limit (needing ~109k).
1 parent e405534 commit cd249d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gpujpeg_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1178,7 +1178,7 @@ gpujpeg_image_calculate_size(struct gpujpeg_image_parameters* param)
11781178
assert(param->width > 0 && param->height > 0);
11791179
assert(param->width <= 65535 && param->height <= 65535);
11801180
assert(param->width_padding >= 0);
1181-
assert(param->width_padding < 100000); // safety check - 100k chosen arbitrarily
1181+
assert(param->width_padding < 10 * 1000 * 1000); // safety check - 10M chosen arbitrarily
11821182
int bpp = gpujpeg_pixel_format_get_unit_size(param->pixel_format);
11831183
if (bpp != 0) {
11841184
return ((size_t) param->width + param->width_padding) * param->height * bpp;

0 commit comments

Comments
 (0)