mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Imported from libpng-1.2.8beta1.tar
This commit is contained in:
6
pngget.c
6
pngget.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngget.c - retrieval of values from info struct
|
||||
*
|
||||
* libpng 1.2.7 - September 12, 2004
|
||||
* libpng 1.2.8beta1 - November 1, 2004
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2004 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@@ -557,9 +557,9 @@ png_get_IHDR(png_structp png_ptr, png_infop info_ptr,
|
||||
*interlace_type = info_ptr->interlace_type;
|
||||
|
||||
/* check for potential overflow of rowbytes */
|
||||
if (width == 0 || *width > PNG_UINT_31_MAX)
|
||||
if (*width == 0 || *width > PNG_UINT_31_MAX)
|
||||
png_error(png_ptr, "Invalid image width");
|
||||
if (height == 0 || *height > PNG_UINT_31_MAX)
|
||||
if (*height == 0 || *height > PNG_UINT_31_MAX)
|
||||
png_error(png_ptr, "Invalid image height");
|
||||
if (info_ptr->width > (PNG_UINT_32_MAX
|
||||
>> 3) /* 8-byte RGBA pixels */
|
||||
|
||||
Reference in New Issue
Block a user