php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch php-exif-urational-fix for EXIF related Bug #77184

Patch version 2018-11-21 21:35 UTC

Return to Bug #77184 | Download this patch
Patch Revisions:

Developer:

diff --git a/ext/exif/exif.c b/ext/exif/exif.c
index 7b51e2f9a7..48e9372161 100644
--- a/ext/exif/exif.c
+++ b/ext/exif/exif.c
@@ -2415,7 +2415,7 @@ static void add_assoc_image_info(zval *value, int sub_array, image_info_type *im
 									break;
 
 								case TAG_FMT_URATIONAL:
-									snprintf(buffer, sizeof(buffer), "%i/%i", info_value->ur.num, info_value->ur.den);
+									snprintf(buffer, sizeof(buffer), "%u/%u", info_value->ur.num, info_value->ur.den);
 									if (l==1) {
 										add_assoc_string(&tmpi, name, buffer);
 									} else {
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 23:01:27 2024 UTC