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.25beta06.tar
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngrutil.c - utilities to read a PNG file
|
||||
*
|
||||
* Last changed in libpng 1.2.25 [February 1, 2008]
|
||||
* Last changed in libpng 1.2.25 [February 6, 2008]
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2008 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@@ -1393,7 +1393,7 @@ png_handle_bKGD(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
|
||||
{
|
||||
png_ptr->background.index = buf[0];
|
||||
if(info_ptr->num_palette)
|
||||
if (info_ptr && info_ptr->num_palette)
|
||||
{
|
||||
if(buf[0] > info_ptr->num_palette)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user