sesser Wed Mar 2 13:23:49 2005 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/exif exif.c Log: MFH http://cvs.php.net/diff.php/php-src/ext/exif/exif.c?r1=1.118.2.33&r2=1.118.2.34&ty=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.118.2.33 php-src/ext/exif/exif.c:1.118.2.34 --- php-src/ext/exif/exif.c:1.118.2.33 Wed Feb 16 07:23:06 2005 +++ php-src/ext/exif/exif.c Wed Mar 2 13:23:49 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: exif.c,v 1.118.2.33 2005/02/16 12:23:06 edink Exp $ */ +/* $Id: exif.c,v 1.118.2.34 2005/03/02 18:23:49 sesser Exp $ */ /* ToDos * @@ -101,7 +101,7 @@ }; /* }}} */ -#define EXIF_VERSION "1.4 $Id: exif.c,v 1.118.2.33 2005/02/16 12:23:06 edink Exp $" +#define EXIF_VERSION "1.4 $Id: exif.c,v 1.118.2.34 2005/03/02 18:23:49 sesser Exp $" /* {{{ PHP_MINFO_FUNCTION */ @@ -2712,6 +2712,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