iliaa           Mon Oct  4 16:44:08 2004 EDT

  Modified files:              (Branch: PHP_4_3)
    /php-src    NEWS 
    /php-src/ext/standard       image.c 
  Log:
  MFH: Fixed bug #30281 (Prevent non-wbmp images from being detected as such)
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.737&r2=1.1247.2.738&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.737 php-src/NEWS:1.1247.2.738
--- php-src/NEWS:1.1247.2.737   Thu Sep 30 11:02:06 2004
+++ php-src/NEWS        Mon Oct  4 16:44:07 2004
@@ -3,8 +3,10 @@
 ?? ??? 2004, Version 4.3.10
 - Backported Marcus' foreach() speedup patch from PHP 5.x. (Derick)
 - Fixed potential problems with unserializing invalid serialize data. (Marcus)
-- Fixed bug #30282 (segfault when using unknown/unsupported session.save_handler 
-  and/or session.serialize_handler). (Tony)
+- Fixed bug #30282 (segfault when using unknown/unsupported
+  session.save_handler and/or session.serialize_handler). (Tony)
+- Fixed bug #30281 (Prevent non-wbmp images from being detected as such).
+  (Ilia)
 - Fixed bug #30276 (Possible crash in ctype_digit on large numbers). (Ilia)
 - Fixed bug #30224 (Sybase date strings are sometimes not null terminated).
   (Ilia)
http://cvs.php.net/diff.php/php-src/ext/standard/image.c?r1=1.72.2.14&r2=1.72.2.15&ty=u
Index: php-src/ext/standard/image.c
diff -u php-src/ext/standard/image.c:1.72.2.14 php-src/ext/standard/image.c:1.72.2.15
--- php-src/ext/standard/image.c:1.72.2.14      Thu Jul 29 21:10:46 2004
+++ php-src/ext/standard/image.c        Mon Oct  4 16:44:07 2004
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: image.c,v 1.72.2.14 2004/07/30 01:10:46 iliaa Exp $ */
+/* $Id: image.c,v 1.72.2.15 2004/10/04 20:44:07 iliaa Exp $ */
 
 #include "php.h"
 #include <stdio.h>
@@ -942,7 +942,7 @@
        } while (i & 0x80);
 
        /* maximum valid sizes for wbmp (although 127x127 may be a more accurate one) 
*/
-       if (height > 2048 || width > 2048) {
+       if (!height || !width || height > 2048 || width > 2048) {
                return 0;
        }
        


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to