cvs: php-src(PHP_5_1) / NEWS /ext/exif exif.c /ext/exif/tests bug34704.jpg bug34704.phpt

From: Date: Sun, 09 Oct 2005 14:40:02 +0000
Subject: cvs: php-src(PHP_5_1) / NEWS /ext/exif exif.c /ext/exif/tests bug34704.jpg bug34704.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-34437@lists.php.net to get a copy of this message
helly Sun Oct 9 10:40:02 2005 EDT Added files: (Branch: PHP_5_1) /php-src/ext/exif/tests bug34704.jpg bug34704.phpt Modified files: /php-src NEWS /php-src/ext/exif exif.c Log: - MFH Bugfix #34704 (Infinite recursion due to corrupt JPEG) http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.103&r2=1.2027.2.104&ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.103 php-src/NEWS:1.2027.2.104 --- php-src/NEWS:1.2027.2.103 Sun Oct 9 08:41:44 2005 +++ php-src/NEWS Sun Oct 9 10:39:59 2005 @@ -49,6 +49,7 @@ - Fixed bug #34785 (subclassing of mysqli_stmt does not work). (Georg) - Fixed bug #34771 (strtotime() fails with 1-12am/pm). (Derick) - Fixed bug #34723 (array_count_values() strips leading zeroes). (Tony) +- Fixed bug #34704 (Infinite recursion due to corrupt JPEG). (Marcus) - Fixed bug #34678 (__call(), is_callable() and static methods). (Dmitry) - Fixed bug #34676: missing support for strtotime("midnight") and strtotime("noon"). (Derick) http://cvs.php.net/diff.php/php-src/ext/exif/exif.c?r1=1.173&r2=1.173.2.1&ty=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.173 php-src/ext/exif/exif.c:1.173.2.1 --- php-src/ext/exif/exif.c:1.173 Fri Aug 5 10:03:57 2005 +++ php-src/ext/exif/exif.c Sun Oct 9 10:40:01 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: exif.c,v 1.173 2005/08/05 14:03:57 hyanantha Exp $ */ +/* $Id: exif.c,v 1.173.2.1 2005/10/09 14:40:01 helly Exp $ */ /* ToDos * @@ -115,7 +115,7 @@ }; /* }}} */ -#define EXIF_VERSION "1.4 $Id: exif.c,v 1.173 2005/08/05 14:03:57 hyanantha Exp $" +#define EXIF_VERSION "1.4 $Id: exif.c,v 1.173.2.1 2005/10/09 14:40:01 helly Exp $" /* {{{ PHP_MINFO_FUNCTION */ @@ -3032,6 +3032,12 @@ } } /* + * Ignore IFD2 if it purportedly exists + */ + if (section_index == SECTION_THUMBNAIL) { + return FALSE; + } + /* * Hack to make it process IDF1 I hope * There are 2 IDFs, the second one holds the keys (0x0201 and 0x0202) to the thumbnail */ http://cvs.php.net/co.php/php-src/ext/exif/tests/bug34704.phpt?r=1.1&p=1 Index: php-src/ext/exif/tests/bug34704.phpt +++ php-src/ext/exif/tests/bug34704.phpt --TEST-- Bug # 34704 (Infinite recursion due to corrupt JPEG) --SKIPIF-- <?php if (!extension_loaded('exif')) print 'skip exif extension not available';?> --INI-- magic_quotes_runtime=0 output_handler= zlib.output_compression=0 --FILE-- <?php $infile = dirname(__FILE__).'/bug34704.jpg'; var_dump(exif_read_data($infile)); ?> ===DONE=== --EXPECT-- array(7) { ["FileName"]=> string(12) "bug34704.jpg" ["FileDateTime"]=> int(1128866682) ["FileSize"]=> int(9976) ["FileType"]=> int(2) ["MimeType"]=> string(10) "image/jpeg" ["SectionsFound"]=> string(4) "IFD0" ["COMPUTED"]=> array(5) { ["html"]=> string(24) "width="386" height="488"" ["Height"]=> int(488) ["Width"]=> int(386) ["IsColor"]=> int(1) ["ByteOrderMotorola"]=> int(0) } } ===DONE===

« previous php.cvs (#34437) next »