]> granicus.if.org Git - php/commitdiff
Fixed bug #30281 (Prevent non-wbmp images from being detected as such).
authorIlia Alshanetsky <iliaa@php.net>
Mon, 4 Oct 2004 20:42:30 +0000 (20:42 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 4 Oct 2004 20:42:30 +0000 (20:42 +0000)
ext/standard/image.c

index 42989805a491f7865ebc7b13a1f826bc3a26ae73..e37175d6e18b90631b19051af6c1c21e4a9cba17 100644 (file)
@@ -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;
        }