diff options
author | Patrick Scott <phanna@android.com> | 2010-06-28 16:55:16 -0400 |
---|---|---|
committer | Patrick Scott <phanna@android.com> | 2010-06-28 16:55:16 -0400 |
commit | 5f6bd84e375226bf228fc8ac90318957ec9e1e7f (patch) | |
tree | da1284f5023ad422da3263b48f1cefa6d6443912 /contrib/gregbook | |
parent | 342380c79a16cc2e5ba7859c3fc4e40f2661ea45 (diff) | |
download | external_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 'contrib/gregbook')
-rw-r--r-- | contrib/gregbook/readpng.c | 2 | ||||
-rw-r--r-- | contrib/gregbook/readpng2.c | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/contrib/gregbook/readpng.c b/contrib/gregbook/readpng.c index d87f6c7..abfc1fb 100644 --- a/contrib/gregbook/readpng.c +++ b/contrib/gregbook/readpng.c @@ -93,7 +93,7 @@ int readpng_init(FILE *infile, ulg *pWidth, ulg *pHeight) * have used slightly more general png_sig_cmp() function instead */ fread(sig, 1, 8, infile); - if (!png_check_sig(sig, 8)) + if (png_sig_cmp(sig, 0, 8)) return 1; /* bad signature */ diff --git a/contrib/gregbook/readpng2.c b/contrib/gregbook/readpng2.c index 9215042..2ee6b68 100644 --- a/contrib/gregbook/readpng2.c +++ b/contrib/gregbook/readpng2.c @@ -159,7 +159,7 @@ void readpng2_version_info(void) int readpng2_check_sig(uch *sig, int num) { - return png_check_sig(sig, num); + return !png_sig_cmp(sig, 0, num); } @@ -379,6 +379,7 @@ static void readpng2_info_callback(png_structp png_ptr, png_infop info_ptr) { mainprog_info *mainprog_ptr; int color_type, bit_depth; + png_uint_32 width, height; double gamma; @@ -414,8 +415,10 @@ static void readpng2_info_callback(png_structp png_ptr, png_infop info_ptr) /* this is just like in the non-progressive case */ - png_get_IHDR(png_ptr, info_ptr, &mainprog_ptr->width, - &mainprog_ptr->height, &bit_depth, &color_type, NULL, NULL, NULL); + png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, + NULL, NULL, NULL); + mainprog_ptr->width = (ulg)width; + mainprog_ptr->height = (ulg)height; /* since we know we've read all of the PNG file's "header" (i.e., up |