]> granicus.if.org Git - php/commitdiff
Might as well disallow 0x0 images.
authorIlia Alshanetsky <iliaa@php.net>
Fri, 4 Apr 2003 01:33:57 +0000 (01:33 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Fri, 4 Apr 2003 01:33:57 +0000 (01:33 +0000)
Thanks Marcus.

ext/gd/gd.c

index d4b771454d689cc6c3398537ea80ca880d4531d7..ad141203a086920be960708fbd5dede4084a8164 100644 (file)
@@ -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;
        }