From: Ilia Alshanetsky Date: Fri, 4 Apr 2003 01:33:57 +0000 (+0000) Subject: Might as well disallow 0x0 images. X-Git-Tag: RELEASE_0_5~145 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5ec34bcd82f5753d130ee87985c780e31ba1577f;p=php Might as well disallow 0x0 images. Thanks Marcus. --- diff --git a/ext/gd/gd.c b/ext/gd/gd.c index d4b771454d..ad141203a0 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -2947,7 +2947,7 @@ PHP_FUNCTION(imagecopyresized) dstH = Z_LVAL_PP(DH); dstW = Z_LVAL_PP(DW); - if (dstW < 0 || dstH < 0 || srcW < 0 || srcH < 0) { + if (dstW <= 0 || dstH <= 0 || srcW <= 0 || srcH <= 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid image dimensions"); RETURN_FALSE; }