aboutsummaryrefslogtreecommitdiffstats
path: root/example.c
diff options
context:
space:
mode:
authorPatrick Scott <phanna@android.com>2010-06-28 16:55:16 -0400
committerPatrick Scott <phanna@android.com>2010-06-28 16:55:16 -0400
commit5f6bd84e375226bf228fc8ac90318957ec9e1e7f (patch)
treeda1284f5023ad422da3263b48f1cefa6d6443912 /example.c
parent342380c79a16cc2e5ba7859c3fc4e40f2661ea45 (diff)
downloadexternal_libpng-5f6bd84e375226bf228fc8ac90318957ec9e1e7f.zip
external_libpng-5f6bd84e375226bf228fc8ac90318957ec9e1e7f.tar.gz
external_libpng-5f6bd84e375226bf228fc8ac90318957ec9e1e7f.tar.bz2
Upgrade libpng to 1.2.44 for security fixes.
Change-Id: Iae257ca6ea7031a99f38e9de196d71ef8b94f9aa
Diffstat (limited to 'example.c')
-rw-r--r--example.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/example.c b/example.c
index dcf38de..49b8724 100644
--- a/example.c
+++ b/example.c
@@ -4,7 +4,7 @@
/* example.c - an example of using libpng
* Last changed in libpng 1.2.37 [June 4, 2009]
* This file has been placed in the public domain by the authors.
- * Maintained 1998-2009 Glenn Randers-Pehrson
+ * Maintained 1998-2010 Glenn Randers-Pehrson
* Maintained 1996, 1997 Andreas Dilger)
* Written 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*/
@@ -509,20 +509,17 @@ row_callback(png_structp png_ptr, png_bytep new_row,
* shown below:
*/
- /* Check if row_num is in bounds. */
- if ((row_num >= 0) && (row_num < height))
- {
- /* Get pointer to corresponding row in our
- * PNG read buffer.
- */
- png_bytep old_row = ((png_bytep *)our_data)[row_num];
-
- /* If both rows are allocated then copy the new row
- * data to the corresponding row data.
- */
- if ((old_row != NULL) && (new_row != NULL))
- png_progressive_combine_row(png_ptr, old_row, new_row);
- }
+ /* Get pointer to corresponding row in our
+ * PNG read buffer.
+ */
+ png_bytep old_row = ((png_bytep *)our_data)[row_num];
+
+ /* If both rows are allocated then copy the new row
+ * data to the corresponding row data.
+ */
+ if ((old_row != NULL) && (new_row != NULL))
+ png_progressive_combine_row(png_ptr, old_row, new_row);
+
/*
* The rows and passes are called in order, so you don't really
* need the row_num and pass, but I'm supplying them because it