From: Ilia Alshanetsky Date: Wed, 30 Jun 2010 12:21:35 +0000 (+0000) Subject: Fixed bug #33210 (getimagesize() fails to detect width/height on certain JPEGs). X-Git-Tag: php-5.3.3RC2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=112ac7e9780103432d363a71c2b5239df6004d08;p=php Fixed bug #33210 (getimagesize() fails to detect width/height on certain JPEGs). --- diff --git a/NEWS b/NEWS index d2c15b7d48..66af976150 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,8 @@ PHP NEWS (Felipe) - Fixed bug #52115 (mysqli_result::fetch_all returns null, not an empty array). (Andrey) +- Fixed bug #33210 (getimagesize() fails to detect width/height on certain + JPEGs). (Ilia) 17 Jun 2010, PHP 5.3.3 RC1 - Upgraded bundled sqlite to version 3.6.23.1. (Ilia) diff --git a/ext/standard/image.c b/ext/standard/image.c index df8cd4b3a9..10a820a3d5 100644 --- a/ext/standard/image.c +++ b/ext/standard/image.c @@ -402,12 +402,7 @@ static unsigned int php_next_marker(php_stream * stream, int last_marker, int co last_marker = M_PSEUDO; /* stop skipping non 0xff for M_COM */ } } - if (++a > 25) - { - /* who knows the maxim amount of 0xff? though 7 */ - /* but found other implementations */ - return M_EOI; - } + a++; } while (marker == 0xff); if (a < 2) {