[libpng15] Fixed bug recently introduced in png_set_PLTE() that uses png_ptr
not info_ptr.
diff --git a/ANNOUNCE b/ANNOUNCE
index 6f41a3f..422939b 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,5 +1,5 @@
-Libpng 1.5.25beta02 - November 22, 2015
+Libpng 1.5.25beta02 - November 23, 2015
This is not intended to be a public release. It will be replaced
within a few weeks by a public version or by another test version.
@@ -32,6 +32,8 @@
png_handle_sPLT(), and png_handle_pCAL() (Bug report by John Regehr).
version 1.5.25beta02 [(PENDING RELEASE)]
+ Fixed bug recently introduced in png_set_PLTE() that uses png_ptr
+ not info_ptr.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
diff --git a/CHANGES b/CHANGES
index b224ba2..6dc5d56 100644
--- a/CHANGES
+++ b/CHANGES
@@ -4429,6 +4429,8 @@
png_handle_sPLT(), and png_handle_pCAL() (Bug report by John Regehr).
version 1.5.25beta02 [(PENDING RELEASE)]
+ Fixed bug recently introduced in png_set_PLTE() that uses png_ptr
+ not info_ptr.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
diff --git a/pngset.c b/pngset.c
index 9c5dc9f..f4cc009 100644
--- a/pngset.c
+++ b/pngset.c
@@ -515,8 +515,8 @@
if (png_ptr == NULL || info_ptr == NULL)
return;
- max_palette_length = (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) ?
- (1 << png_ptr->bit_depth) : PNG_MAX_PALETTE_LENGTH;
+ max_palette_length = (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) ?
+ (1 << info_ptr->bit_depth) : PNG_MAX_PALETTE_LENGTH;
if (num_palette < 0 || num_palette > (int) max_palette_length)
{