mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[devel] Imported from libpng-1.4.0beta73.tar
This commit is contained in:
10
pngwutil.c
10
pngwutil.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngwutil.c - utilities to write a PNG file
|
||||
*
|
||||
* Last changed in libpng 1.4.0 [July 30, 2009]
|
||||
* Last changed in libpng 1.4.0 [August 1, 2009]
|
||||
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
@@ -814,6 +814,14 @@ png_write_iCCP(png_structp png_ptr, png_charp name, int compression_type,
|
||||
((*( (png_bytep)profile + 2))<< 8) |
|
||||
((*( (png_bytep)profile + 3)) );
|
||||
|
||||
if (embedded_profile_len < 0)
|
||||
{
|
||||
png_warning(png_ptr,
|
||||
"Embedded profile length in iCCP chunk is negative");
|
||||
png_free(png_ptr, new_name);
|
||||
return;
|
||||
}
|
||||
|
||||
if (profile_len < embedded_profile_len)
|
||||
{
|
||||
png_warning(png_ptr,
|
||||
|
||||
Reference in New Issue
Block a user