cvs: php-src /ext/standard image.c
| From: | Ilia Alshanetsky | Date: | Fri, 30 Jul 2004 01:10:41 +0000 |
| Subject: | cvs: php-src /ext/standard image.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-28065@lists.php.net to get a copy of this message | ||
iliaa Thu Jul 29 21:10:41 2004 EDT
Modified files:
/php-src/ext/standard image.c
Log:
Fixed bug #29443 (Sanity check for wbmp detection).
http://cvs.php.net/diff.php/php-src/ext/standard/image.c?r1=1.98&r2=1.99&ty=u
Index: php-src/ext/standard/image.c
diff -u php-src/ext/standard/image.c:1.98 php-src/ext/standard/image.c:1.99
--- php-src/ext/standard/image.c:1.98 Thu Jan 8 03:17:32 2004
+++ php-src/ext/standard/image.c Thu Jul 29 21:10:41 2004
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: image.c,v 1.98 2004/01/08 08:17:32 andi Exp $ */
+/* $Id: image.c,v 1.99 2004/07/30 01:10:41 iliaa Exp $ */
#include "php.h"
#include <stdio.h>
@@ -955,6 +955,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;