Imported from libpng-1.2.25beta06.tar

This commit is contained in:
Glenn Randers-Pehrson
2008-02-06 10:32:29 -06:00
parent 4b7dca3d2c
commit 913bc38217
53 changed files with 203 additions and 1087 deletions

View File

@@ -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)
{