From d930d36155fe79b277c11d868572769cb4ffb586 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Thu, 3 Aug 2017 10:29:10 -0500 Subject: [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). --- pngget.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'pngget.c') diff --git a/pngget.c b/pngget.c index 9068952f8..5046db58a 100644 --- a/pngget.c +++ b/pngget.c @@ -777,12 +777,23 @@ png_get_sPLT(png_const_structrp png_ptr, png_inforp info_ptr, png_uint_32 PNGAPI png_get_eXIf(png_const_structrp png_ptr, png_inforp info_ptr, png_bytep *exif) +{ + png_warning(png_ptr, "png_get_eXIf does not work; use png_get_eXIf_1"); + PNG_UNUSED(info_ptr) + PNG_UNUSED(exif) + return 0; +} + +png_uint_32 PNGAPI +png_get_eXIf_1(png_const_structrp png_ptr, png_inforp info_ptr, + png_uint_32 *num_exif, png_bytep *exif) { png_debug1(1, "in %s retrieval function", "eXIf"); if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_eXIf) != 0 && exif != NULL) { + *num_exif = info_ptr->num_exif; *exif = info_ptr->exif; return (PNG_INFO_eXIf); } -- cgit v1.2.1