From: Ilia Alshanetsky Date: Fri, 30 Jul 2004 01:10:42 +0000 (+0000) Subject: MFH: Fixed bug #29443 (Sanity check for wbmp detection). X-Git-Tag: php-5.0.1RC1~53 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=40773632e0e942639a5c4d53357bedf72e6922aa;p=php MFH: Fixed bug #29443 (Sanity check for wbmp detection). --- diff --git a/ext/standard/image.c b/ext/standard/image.c index c2c3c7ab86..329cd92bd6 100644 --- a/ext/standard/image.c +++ b/ext/standard/image.c @@ -955,6 +955,11 @@ static int php_get_wbmp(php_stream *stream, struct gfxinfo **result, int check T } 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;