mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng15] Check for png_ptr==NULL earlier in png_zalloc().
This commit is contained in:
parent
abc54c090b
commit
a8488b78dc
5
ANNOUNCE
5
ANNOUNCE
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
Libpng 1.5.14beta02 - November 30, 2012
|
Libpng 1.5.14beta02 - December 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,8 +32,9 @@ Version 1.5.14beta01 [October 24, 2012]
|
|||||||
Fixed build when using #define PNG_NO_READ_GAMMA in png_do_compose() in
|
Fixed build when using #define PNG_NO_READ_GAMMA in png_do_compose() in
|
||||||
pngrtran.c (Domani Hannes).
|
pngrtran.c (Domani Hannes).
|
||||||
|
|
||||||
Version 1.5.14beta02 [November 30, 2012]
|
Version 1.5.14beta02 [December 10, 2012]
|
||||||
Added missing "-" in front of DNO_GZIP in contrib/pngminim/*/makefile.
|
Added missing "-" in front of DNO_GZIP in contrib/pngminim/*/makefile.
|
||||||
|
Check for png_ptr==NULL earlier in png_zalloc().
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
3
CHANGES
3
CHANGES
@ -3925,8 +3925,9 @@ Version 1.5.14beta01 [October 24, 2012]
|
|||||||
Fixed build when using #define PNG_NO_READ_GAMMA in png_do_compose() in
|
Fixed build when using #define PNG_NO_READ_GAMMA in png_do_compose() in
|
||||||
pngrtran.c (Domani Hannes).
|
pngrtran.c (Domani Hannes).
|
||||||
|
|
||||||
Version 1.5.14beta02 [November 30, 2012]
|
Version 1.5.14beta02 [December 10, 2012]
|
||||||
Added missing "-" in front of DNO_GZIP in contrib/pngminim/*/makefile.
|
Added missing "-" in front of DNO_GZIP in contrib/pngminim/*/makefile.
|
||||||
|
Check for png_ptr==NULL earlier in png_zalloc().
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
11
png.c
11
png.c
@ -73,13 +73,16 @@ PNG_FUNCTION(voidpf /* PRIVATE */,
|
|||||||
png_zalloc,(voidpf png_ptr, uInt items, uInt size),PNG_ALLOCATED)
|
png_zalloc,(voidpf png_ptr, uInt items, uInt size),PNG_ALLOCATED)
|
||||||
{
|
{
|
||||||
png_voidp ptr;
|
png_voidp ptr;
|
||||||
png_structp p=(png_structp)png_ptr;
|
png_structp p;
|
||||||
png_uint_32 save_flags=p->flags;
|
png_uint_32 save_flags;
|
||||||
png_alloc_size_t num_bytes;
|
png_alloc_size_t num_bytes;
|
||||||
|
|
||||||
if (png_ptr == NULL)
|
if (png_ptr == NULL)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
|
||||||
|
p=(png_structp)png_ptr;
|
||||||
|
save_flags=p->flags;
|
||||||
|
|
||||||
if (items > PNG_UINT_32_MAX/size)
|
if (items > PNG_UINT_32_MAX/size)
|
||||||
{
|
{
|
||||||
png_warning (p, "Potential overflow in png_zalloc()");
|
png_warning (p, "Potential overflow in png_zalloc()");
|
||||||
@ -655,13 +658,13 @@ png_get_copyright(png_const_structp png_ptr)
|
|||||||
#else
|
#else
|
||||||
# ifdef __STDC__
|
# ifdef __STDC__
|
||||||
return PNG_STRING_NEWLINE \
|
return PNG_STRING_NEWLINE \
|
||||||
"libpng version 1.5.14beta02 - October 24, 2012" PNG_STRING_NEWLINE \
|
"libpng version 1.5.14beta02 - December 10, 2012" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1998-2012 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
|
"Copyright (c) 1998-2012 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
|
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
|
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
|
||||||
PNG_STRING_NEWLINE;
|
PNG_STRING_NEWLINE;
|
||||||
# else
|
# else
|
||||||
return "libpng version 1.5.14beta02 - October 24, 2012\
|
return "libpng version 1.5.14beta02 - December 10, 2012\
|
||||||
Copyright (c) 1998-2012 Glenn Randers-Pehrson\
|
Copyright (c) 1998-2012 Glenn Randers-Pehrson\
|
||||||
Copyright (c) 1996-1997 Andreas Dilger\
|
Copyright (c) 1996-1997 Andreas Dilger\
|
||||||
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
|
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user