diff options
author | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2006-02-22 09:19:25 -0600 |
---|---|---|
committer | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2009-04-06 16:08:25 -0500 |
commit | ddfebd35be90ff274975a71f0ba034bf656be174 (patch) | |
tree | dc81919bed48360ba93b0b0f8325d33e87560257 /pngrutil.c | |
parent | 9c3ab681455e5dff1b9dd9c38299f1c06afa908b (diff) | |
download | libpng-ddfebd35be90ff274975a71f0ba034bf656be174.tar.gz |
Imported from libpng-1.2.9beta2.tarv1.2.9beta2
Diffstat (limited to 'pngrutil.c')
-rw-r--r-- | pngrutil.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/pngrutil.c b/pngrutil.c index 9c434e0fd..762f92cd0 100644 --- a/pngrutil.c +++ b/pngrutil.c @@ -1,6 +1,6 @@ /* pngrutil.c - utilities to read a PNG file * - * libpng version 1.2.9beta1 - February 21, 2006 + * libpng version 1.2.9beta2 - February 22, 2006 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2006 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) @@ -60,7 +60,6 @@ png_get_uint_32(png_bytep buf) return (i); } -#if defined(PNG_READ_pCAL_SUPPORTED) || defined(PNG_READ_oFFs_SUPPORTED) /* Grab a signed 32-bit integer from a buffer in big-endian format. The * data is stored in the PNG file in two's complement format, and it is * assumed that the machine format for signed integers is the same. */ @@ -74,7 +73,6 @@ png_get_int_32(png_bytep buf) return (i); } -#endif /* PNG_READ_pCAL_SUPPORTED */ /* Grab an unsigned 16-bit integer from a buffer in big-endian format. */ png_uint_16 PNGAPI @@ -779,8 +777,7 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_crc_read(png_ptr, buf, 4); uint_y = png_get_uint_32(buf); - if (uint_x > 80000L || uint_y > 80000L || - uint_x + uint_y > 100000L) + if (uint_x + uint_y > 100000L) { png_warning(png_ptr, "Invalid cHRM red point"); png_crc_finish(png_ptr, 16); @@ -795,8 +792,7 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_crc_read(png_ptr, buf, 4); uint_y = png_get_uint_32(buf); - if (uint_x > 80000L || uint_y > 80000L || - uint_x + uint_y > 100000L) + if (uint_x + uint_y > 100000L) { png_warning(png_ptr, "Invalid cHRM green point"); png_crc_finish(png_ptr, 8); @@ -811,8 +807,7 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_crc_read(png_ptr, buf, 4); uint_y = png_get_uint_32(buf); - if (uint_x > 80000L || uint_y > 80000L || - uint_x + uint_y > 100000L) + if (uint_x + uint_y > 100000L) { png_warning(png_ptr, "Invalid cHRM blue point"); png_crc_finish(png_ptr, 0); |