From 12924f33bd989ae6c693a0e4fd83f6e95d7769e0 Mon Sep 17 00:00:00 2001 From: John Bowler Date: Mon, 5 Dec 2011 12:36:04 -0600 Subject: [PATCH] [libpng16] Fixed minor memset/sizeof errors in pngvalid.c. --- ANNOUNCE | 5 +++-- CHANGES | 3 ++- contrib/libtests/pngvalid.c | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index a8bca4db1..848b76e4e 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.6.0alpha01 - December 4, 2011 +Libpng 1.6.0alpha01 - December 5, 2011 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. @@ -107,7 +107,7 @@ Version 1.5.7beta05 [(PENDING RELEASE)] Added MINGW support to CMakeLists.txt Reject invalid compression flag or method when reading the iTXt chunk. -Version 1.6.0alpha01 [December 4, 2011] +Version 1.6.0alpha01 [December 5, 2011] Removed machine-generated configure files from the GIT repository (they will continue to appear in the tarball distributions). Restored the new 'simplified' API, which was deleted from libpng-1.5.7. @@ -134,6 +134,7 @@ Version 1.6.0alpha01 [December 4, 2011] Revised pngconf.h to use " __declspec(restrict)" only when MSC_VER >= 1400, as in libpng-1.5.4. Put CRLF line endings in the owatcom project files. + Fixed minor memset/sizeof errors in pngvalid.c. Send comments/corrections/commendations to png-mng-implement at lists.sf.net: (subscription required; visit diff --git a/CHANGES b/CHANGES index 3e005a7b3..18ad18a7a 100644 --- a/CHANGES +++ b/CHANGES @@ -3752,7 +3752,7 @@ Version 1.5.7beta05 [(PENDING RELEASE)] Added MINGW support to CMakeLists.txt Reject invalid compression flag or method when reading the iTXt chunk. -Version 1.6.0alpha01 [December 4, 2011] +Version 1.6.0alpha01 [December 5, 2011] Removed machine-generated configure files from the GIT repository (they will continue to appear in the tarball distributions). Restored the new 'simplified' API, which was deleted from libpng-1.5.7. @@ -3779,6 +3779,7 @@ Version 1.6.0alpha01 [December 4, 2011] Revised pngconf.h to use " __declspec(restrict)" only when MSC_VER >= 1400, as in libpng-1.5.4. Put CRLF line endings in the owatcom project files. + Fixed minor memset/sizeof errors in pngvalid.c. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/contrib/libtests/pngvalid.c b/contrib/libtests/pngvalid.c index ac0dcdcda..5ce43d3c3 100644 --- a/contrib/libtests/pngvalid.c +++ b/contrib/libtests/pngvalid.c @@ -4091,7 +4091,7 @@ read_palette(store_palette palette, int *npalette, png_structp pp, png_infop pi) png_error(pp, "validate: invalid PLTE result"); /* But there is no palette, so record this: */ *npalette = 0; - memset(palette, 113, sizeof palette); + memset(palette, 113, sizeof (store_palette)); } trans_alpha = 0; @@ -5277,7 +5277,7 @@ static void transform_display_init(transform_display *dp, png_modifier *pm, png_uint_32 id, PNG_CONST image_transform *transform_list) { - memset(dp, 0, sizeof dp); + memset(dp, 0, sizeof *dp); /* Standard fields */ standard_display_init(&dp->this, &pm->this, id, 0/*do_interlace*/,