Browse files

Use png_bytep instead of png_bytepp for the iCCP profile

As suggested by Andrew Ruder in #3
to avoid storing the profile pointer in an undefined memory location.
  • Loading branch information...
1 parent 87c953a commit 2766e9574a7437b5b52c9e778abe83420729dba0 @knocte knocte committed Jul 9, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/pngcodec.c
@@ -136,11 +136,11 @@ gdip_load_png_properties (png_structp png_ptr, png_infop info_ptr, png_infop end
#if defined(PNG_iCCP_SUPPORTED)
png_charp name;
- png_bytepp profile;
+ png_bytep profile;
png_uint_32 proflen;
int compression_type;
- if (png_get_iCCP(png_ptr, info_ptr, &name, &compression_type, profile, &proflen)) {
+ if (png_get_iCCP(png_ptr, info_ptr, &name, &compression_type, &profile, &proflen)) {
gdip_bitmapdata_property_add_ASCII(bitmap_data, PropertyTagICCProfileDescriptor, (BYTE*)name);
gdip_bitmapdata_property_add_byte(bitmap_data, PropertyTagICCProfile, (BYTE)compression_type);

0 comments on commit 2766e95

Please sign in to comment.