svn: /php/php-src/ branches/PHP_5_3/ext/exif/exif.c branches/PHP_5_3/ext/exif/tests/bug54002.phpt trunk/ext/exif/exif.c
trunk/ext/exif/tests/bug54002.phpt
| From: | Pierre Joye | Date: | Mon, 14 Feb 2011 09:40:10 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_3/ext/exif/exif.c branches/PHP_5_3/ext/exif/tests/bug54002.phpt trunk/ext/exif/exif.c trunk/ext/exif/tests/bug54002.phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-64537@lists.php.net to get a copy of this message | ||
pajoye Mon, 14 Feb 2011 09:40:10 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=308317
Log:
-Bug #54002, fix windows build, use the relevant values in the warnings
Bug: http://bugs.php.net/54002 (error getting bug
information)
Changed paths:
U php/php-src/branches/PHP_5_3/ext/exif/exif.c
U php/php-src/branches/PHP_5_3/ext/exif/tests/bug54002.phpt
U php/php-src/trunk/ext/exif/exif.c
U php/php-src/trunk/ext/exif/tests/bug54002.phpt
Modified: php/php-src/branches/PHP_5_3/ext/exif/exif.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/exif/exif.c 2011-02-14 09:08:44 UTC (rev 308316)
+++ php/php-src/branches/PHP_5_3/ext/exif/exif.c 2011-02-14 09:40:10 UTC (rev 308317)
@@ -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
@@ -2851,14 +2851,14 @@
}
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;
}
Modified: php/php-src/branches/PHP_5_3/ext/exif/tests/bug54002.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/exif/tests/bug54002.phpt 2011-02-14 09:08:44 UTC (rev 308316)
+++ php/php-src/branches/PHP_5_3/ext/exif/tests/bug54002.phpt 2011-02-14 09:40:10 UTC (rev 308317)
@@ -11,10 +11,10 @@
?>
--EXPECTF--
-Warning: exif_read_data(bug54002_1.jpeg): Process tag(x0205=UndefinedTa): Illegal byte_count(8) 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(8) 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
Modified: php/php-src/trunk/ext/exif/exif.c
===================================================================
--- php/php-src/trunk/ext/exif/exif.c 2011-02-14 09:08:44 UTC (rev 308316)
+++ php/php-src/trunk/ext/exif/exif.c 2011-02-14 09:40:10 UTC (rev 308317)
@@ -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 @@
}
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;
}
Modified: php/php-src/trunk/ext/exif/tests/bug54002.phpt
===================================================================
--- php/php-src/trunk/ext/exif/tests/bug54002.phpt 2011-02-14 09:08:44 UTC (rev 308316)
+++ php/php-src/trunk/ext/exif/tests/bug54002.phpt 2011-02-14 09:40:10 UTC (rev 308317)
@@ -11,10 +11,10 @@
?>
--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