diff options
| author | Pierre Joye <pajoye@php.net> | 2011-02-15 14:02:26 +0000 |
|---|---|---|
| committer | Pierre Joye <pajoye@php.net> | 2011-02-15 14:02:26 +0000 |
| commit | 2a7acc3f4dd7415c0b50c8872a796159b896130e (patch) | |
| tree | e40a57724c6beda408945ff22fb5434090465090 /ext/exif/exif.c | |
| parent | 36671fe7819f98ee42fed945f0e2d8c3e4b9921b (diff) | |
| download | php-git-2a7acc3f4dd7415c0b50c8872a796159b896130e.tar.gz | |
- fix the fix (Dmitry) and ensure that it builds everywhere, can someone test on solaris&co pls?
Diffstat (limited to 'ext/exif/exif.c')
| -rw-r--r-- | ext/exif/exif.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ext/exif/exif.c b/ext/exif/exif.c index 2b8e5f2276..13137da838 100644 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@ -40,8 +40,14 @@ #include "php.h" #include "ext/standard/file.h" +#ifdef HAVE_STDINT_H +# include <stdint.h> +#endif +#ifdef HAVE_INTTYPES_H +# include <inttypes.h> +#endif #ifdef PHP_WIN32 -#include "win32/php_stdint.h" +# include "win32/php_stdint.h" #endif #if HAVE_EXIF @@ -2853,7 +2859,7 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha byte_count_signed = (int64_t)components * php_tiff_bytes_per_format[format]; - if (byte_count_signed < 0 || (byte_count_signed > 2147483648)) { + if (byte_count_signed < 0 || (byte_count_signed > INT32_MAX)) { 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; } |
