sesser Wed Mar 2 13:22:41 2005 EDT Modified files: (Branch: PHP_5_0) /php-src/ext/exif exif.c Log: MFH http://cvs.php.net/diff.php/php-src/ext/exif/exif.c?r1=1.162.2.6&r2=1.162.2.7&ty=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.162.2.6 php-src/ext/exif/exif.c:1.162.2.7 --- php-src/ext/exif/exif.c:1.162.2.6 Wed Feb 16 04:56:30 2005 +++ php-src/ext/exif/exif.c Wed Mar 2 13:22:40 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: exif.c,v 1.162.2.6 2005/02/16 09:56:30 edink Exp $ */ +/* $Id: exif.c,v 1.162.2.7 2005/03/02 18:22:40 sesser Exp $ */ /* ToDos * @@ -112,7 +112,7 @@ }; /* }}} */ -#define EXIF_VERSION "1.4 $Id: exif.c,v 1.162.2.6 2005/02/16 09:56:30 edink Exp $" +#define EXIF_VERSION "1.4 $Id: exif.c,v 1.162.2.7 2005/03/02 18:22:40 sesser Exp $" /* {{{ PHP_MINFO_FUNCTION */ @@ -2733,6 +2733,11 @@ byte_count = components * php_tiff_bytes_per_format[format]; + if ((ssize_t)byte_count < 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); + return FALSE; + } + if (byte_count > 4) { offset_val = php_ifd_get32u(dir_entry+8, ImageInfo->motorola_intel); /* If its bigger than 4 bytes, the dir entry contains an offset. */
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php