From: Ilia Alshanetsky Date: Mon, 4 Oct 2004 20:42:30 +0000 (+0000) Subject: Fixed bug #30281 (Prevent non-wbmp images from being detected as such). X-Git-Tag: PRE_NEW_VM_GEN_PATCH~98 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5316f7bf25807fdb4e7ed86fd11f6ca1a0be1941;p=php Fixed bug #30281 (Prevent non-wbmp images from being detected as such). --- diff --git a/ext/standard/image.c b/ext/standard/image.c index 42989805a4..e37175d6e1 100644 --- a/ext/standard/image.c +++ b/ext/standard/image.c @@ -954,7 +954,7 @@ static int php_get_wbmp(php_stream *stream, struct gfxinfo **result, int check T } 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; }