]> granicus.if.org Git - php/commitdiff
-Bug #54002, fix windows build, use the relevant values in the warnings
authorPierre Joye <pajoye@php.net>
Mon, 14 Feb 2011 09:40:10 +0000 (09:40 +0000)
committerPierre Joye <pajoye@php.net>
Mon, 14 Feb 2011 09:40:10 +0000 (09:40 +0000)
ext/exif/exif.c
ext/exif/tests/bug54002.phpt

index 2063180946bc13f7b3738791e2786b0a453c1eac..2b8e5f2276518fdd9e4936d3910eea6b002c01d5 100644 (file)
@@ -41,7 +41,7 @@
 #include "ext/standard/file.h"
 
 #ifdef PHP_WIN32
-include "win32/php_stdint.h"
+#include "win32/php_stdint.h"
 #endif
 
 #if HAVE_EXIF
@@ -2847,13 +2847,14 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha
        }
 
        if (components < 0) {
-               exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "Process tag(x%04X=%s): Illegal byte_count(%ld)", tag, exif_get_tagname(tag, tagname, -12, tag_table TSRMLS_CC), byte_count);
+               exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "Process tag(x%04X=%s): Illegal components(%ld)", tag, exif_get_tagname(tag, tagname, -12, tag_table TSRMLS_CC), components);
                return FALSE;
        }
+
        byte_count_signed = (int64_t)components * php_tiff_bytes_per_format[format];
 
        if (byte_count_signed < 0 || (byte_count_signed > 2147483648)) {
-               exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "Process tag(x%04X=%s): Illegal byte_count(%ld)", tag, exif_get_tagname(tag, tagname, -12, tag_table TSRMLS_CC), byte_count);
+               exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "Process tag(x%04X=%s): Illegal byte_count", tag, exif_get_tagname(tag, tagname, -12, tag_table TSRMLS_CC));
                return FALSE;
        }
 
index 19992464eba934e669c5a02149cbc6fc6c24b189..c51fa58897bb58dc847cba52951de1c3270e7f73 100644 (file)
@@ -11,10 +11,10 @@ exif_read_data(__DIR__ . '/bug54002_2.jpeg');
 
 ?>
 --EXPECTF--
-Warning: exif_read_data(bug54002_1.jpeg): Process tag(x0205=UndefinedTa): Illegal byte_count(%d) in %sbug54002.php on line %d
+Warning: exif_read_data(bug54002_1.jpeg): Process tag(x0205=UndefinedTa): Illegal byte_count in %sbug54002.php on line %d
 
 Warning: exif_read_data(bug54002_1.jpeg): Process tag(xA000=FlashPixVer): Illegal pointer offset(%s) in %sbug54002.php on line %d
 
-Warning: exif_read_data(bug54002_2.jpeg): Process tag(x0205=UndefinedTa): Illegal byte_count(%d) in %sbug54002.php on line %d
+Warning: exif_read_data(bug54002_2.jpeg): Process tag(x0205=UndefinedTa): Illegal byte_count in %sbug54002.php on line %d
 
 Warning: exif_read_data(bug54002_2.jpeg): Process tag(xA000=FlashPixVer): Illegal pointer offset(%s) in %sbug54002.php on line %d