1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-20 04:02:27 +00:00
freebsd-ports/graphics/optipng/files/patch-src_pngxtern_pngxmem.c
Yuri Victorovich bcabb44f17 graphics/optipng: Update to 0.7.7
PR:		224960
Submitted by:	Vidar Karlsen <vidar@karlsen.tech>
Approved by:	timeout expired, tcberner (mentor, implicit)
2018-02-12 10:02:02 +00:00

12 lines
601 B
C

--- src/pngxtern/pngxmem.c.orig 2018-01-06 23:22:33 UTC
+++ src/pngxtern/pngxmem.c
@@ -35,7 +35,7 @@ pngx_malloc_rows_extended(png_structp pn
row_size = png_get_rowbytes(png_ptr, info_ptr);
/* libpng sets row_size to 0 when the width is too large to process. */
if (row_size == 0 ||
- (pngx_alloc_size_t)height > (pngx_alloc_size_t)(-1) / sizeof(png_bytep))
+ (pngx_alloc_size_t)height > (pngx_alloc_size_t)(-1U) / sizeof(png_bytep))
png_error(png_ptr, "Can't handle exceedingly large image dimensions");
if (row_size < min_row_size)
row_size = min_row_size;