From 5ec34bcd82f5753d130ee87985c780e31ba1577f Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Fri, 4 Apr 2003 01:33:57 +0000 Subject: [PATCH] Might as well disallow 0x0 images. Thanks Marcus. --- ext/gd/gd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.50.1