[libpng15] Use png_memset() consistently (pngmem.c contained some bare "memset"

calls).
This commit is contained in:
Glenn Randers-Pehrson 2012-08-10 16:56:51 -05:00
parent 8cc5341ba2
commit cabfa7d6d9
3 changed files with 9 additions and 7 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.5.13beta02 - August 9, 2012 Libpng 1.5.13beta02 - August 10, 2012
This is not intended to be a public release. It will be replaced 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. within a few weeks by a public version or by another test version.
@ -32,7 +32,7 @@ Version 1.5.13beta01 [August 8, 2012]
Revised PNG_FP_EXPORT and PNG_FIXED_EXPORT macros to avoid generating Revised PNG_FP_EXPORT and PNG_FIXED_EXPORT macros to avoid generating
lone semicolons (patch ported from libpng-1.6.0beta11). lone semicolons (patch ported from libpng-1.6.0beta11).
Version 1.5.13beta02 [August 9, 2012] Version 1.5.13beta02 [August 10, 2012]
Corrected handling of the image array and the row_pointers array in example.c Corrected handling of the image array and the row_pointers array in example.c
When png_set_filler is used to strip a filler channel during write, the When png_set_filler is used to strip a filler channel during write, the
code prior to 1.5 would ignore the case where the output required an code prior to 1.5 would ignore the case where the output required an
@ -41,6 +41,7 @@ Version 1.5.13beta02 [August 9, 2012]
in a bad (potential memory overwrite) failure later. This reverts in a bad (potential memory overwrite) failure later. This reverts
the behavior to the pre-1.5 state but issues a warning. libpng-1.6 is the behavior to the pre-1.5 state but issues a warning. libpng-1.6 is
expected to issue an error on the erroneous png_set_filler call. expected to issue an error on the erroneous png_set_filler call.
Use png_memset() consistently (pngmem.c contained some bare "memset" calls).
Send comments/corrections/commendations to png-mng-implement at lists.sf.net: Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
(subscription required; visit (subscription required; visit

View File

@ -3902,7 +3902,7 @@ Version 1.5.13beta01 [August 8, 2012]
Revised PNG_FP_EXPORT and PNG_FIXED_EXPORT macros to avoid generating Revised PNG_FP_EXPORT and PNG_FIXED_EXPORT macros to avoid generating
lone semicolons (patch ported from libpng-1.6.0beta11). lone semicolons (patch ported from libpng-1.6.0beta11).
Version 1.5.13beta02 [August 9, 2012] Version 1.5.13beta02 [August 10, 2012]
Corrected handling of the image array and the row_pointers array in example.c Corrected handling of the image array and the row_pointers array in example.c
When png_set_filler is used to strip a filler channel during write, the When png_set_filler is used to strip a filler channel during write, the
code prior to 1.5 would ignore the case where the output required an code prior to 1.5 would ignore the case where the output required an
@ -3911,6 +3911,7 @@ Version 1.5.13beta02 [August 9, 2012]
in a bad (potential memory overwrite) failure later. This reverts in a bad (potential memory overwrite) failure later. This reverts
the behavior to the pre-1.5 state but issues a warning. libpng-1.6 is the behavior to the pre-1.5 state but issues a warning. libpng-1.6 is
expected to issue an error on the erroneous png_set_filler call. expected to issue an error on the erroneous png_set_filler call.
Use png_memset() consistently (pngmem.c contained some bare "memset" calls).
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net

View File

@ -1,8 +1,8 @@
/* pngmem.c - stub functions for memory allocation /* pngmem.c - stub functions for memory allocation
* *
* Last changed in libpng 1.5.7 [December 15, 2011] * Last changed in libpng 1.5.13 [(PENDING RELEASE)]
* Copyright (c) 1998-2011 Glenn Randers-Pehrson * Copyright (c) 1998-2012 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
* *
@ -56,7 +56,7 @@ png_create_struct_2,(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr),
if (malloc_fn != NULL) if (malloc_fn != NULL)
{ {
png_struct dummy_struct; png_struct dummy_struct;
memset(&dummy_struct, 0, sizeof dummy_struct); png_memset(&dummy_struct, 0, sizeof dummy_struct);
dummy_struct.mem_ptr=mem_ptr; dummy_struct.mem_ptr=mem_ptr;
struct_ptr = (*(malloc_fn))(&dummy_struct, (png_alloc_size_t)size); struct_ptr = (*(malloc_fn))(&dummy_struct, (png_alloc_size_t)size);
} }
@ -90,7 +90,7 @@ png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn,
if (free_fn != NULL) if (free_fn != NULL)
{ {
png_struct dummy_struct; png_struct dummy_struct;
memset(&dummy_struct, 0, sizeof dummy_struct); png_memset(&dummy_struct, 0, sizeof dummy_struct);
dummy_struct.mem_ptr=mem_ptr; dummy_struct.mem_ptr=mem_ptr;
(*(free_fn))(&dummy_struct, struct_ptr); (*(free_fn))(&dummy_struct, struct_ptr);
return; return;