diff options
author | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2017-08-03 10:29:10 -0500 |
---|---|---|
committer | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2017-08-03 10:29:10 -0500 |
commit | d930d36155fe79b277c11d868572769cb4ffb586 (patch) | |
tree | decf2c34330688b8956b9a90a42b0572773e8595 /pngset.c | |
parent | a1fe2c98489519d415b72bc0026f0c86d82278b7 (diff) |
[libpng16] Restored png_get_eXIf_1() and png_set_eXIf_1() because strlen(eXIf_buf)
does not work (the eXIf chunk data can contain zeroes).
Diffstat (limited to 'pngset.c')
-rw-r--r-- | pngset.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -139,6 +139,15 @@ void PNGAPI png_set_eXIf(png_const_structrp png_ptr, png_inforp info_ptr, const png_bytep eXIf_buf) { + png_warning(png_ptr, "png_set_eXIf does not work; use png_set_eXIf_1"); + PNG_UNUSED(info_ptr) + PNG_UNUSED(eXIf_buf) +} + +void PNGAPI +png_set_eXIf_1(png_const_structrp png_ptr, png_inforp info_ptr, + const png_uint_32 num_exif, const png_bytep eXIf_buf) +{ int i; png_debug1(1, "in %s storage function", "eXIf"); @@ -152,7 +161,7 @@ png_set_eXIf(png_const_structrp png_ptr, png_inforp info_ptr, info_ptr->exif = NULL; } - info_ptr->num_exif = (png_uint_32)strlen((const char *)eXIf_buf); + info_ptr->num_exif = num_exif; info_ptr->exif = png_voidcast(png_bytep, png_malloc_warn(png_ptr, info_ptr->num_exif)); |