iliaa           Thu Jul 29 21:10:47 2004 EDT

  Modified files:              (Branch: PHP_4_3)
    /php-src    NEWS 
    /php-src/ext/standard       image.c 
  Log:
  MFH: Fixed bug #29443 (Sanity check for wbmp detection).
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.709&r2=1.1247.2.710&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.709 php-src/NEWS:1.1247.2.710
--- php-src/NEWS:1.1247.2.709   Mon Jul 26 20:27:10 2004
+++ php-src/NEWS        Thu Jul 29 21:10:46 2004
@@ -4,6 +4,7 @@
 - Updated PCRE to provide better error handling in certain cases. (Andrei)
 - NSAPI: added "bucket" parameter to list of non-php.ini-keys of php4_execute
   for doing performance stats without warnings in server-log. (Uwe Schindler)
+- Fixed bug #29443 (Sanity check for wbmp detection). (Ilia)
 - Fixed bug #29369 (Uploaded files with ' or " in their names get their names
   truncated at those characters). (Ilia)
 - Fixed bug #29349 (imagecreatefromstring() crashes with external GD library).
http://cvs.php.net/diff.php/php-src/ext/standard/image.c?r1=1.72.2.13&r2=1.72.2.14&ty=u
Index: php-src/ext/standard/image.c
diff -u php-src/ext/standard/image.c:1.72.2.13 php-src/ext/standard/image.c:1.72.2.14
--- php-src/ext/standard/image.c:1.72.2.13      Wed Nov 12 17:56:09 2003
+++ php-src/ext/standard/image.c        Thu Jul 29 21:10:46 2004
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: image.c,v 1.72.2.13 2003/11/12 22:56:09 helly Exp $ */
+/* $Id: image.c,v 1.72.2.14 2004/07/30 01:10:46 iliaa Exp $ */
 
 #include "php.h"
 #include <stdio.h>
@@ -940,6 +940,11 @@
                }
                height = (height << 7) | (i & 0x7f);
        } while (i & 0x80);
+
+       /* maximum valid sizes for wbmp (although 127x127 may be a more accurate one) 
*/
+       if (height > 2048 || width > 2048) {
+               return 0;
+       }
        
        if (!check) {
                (*result)->width = width;

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

Reply via email to