1
0
mirror of https://github.com/php/php-src.git synced 2026-04-17 04:51:03 +02:00

Might as well disallow 0x0 images.

Thanks Marcus.
This commit is contained in:
Ilia Alshanetsky
2003-04-04 01:33:57 +00:00
parent 8809836586
commit 5ec34bcd82

View 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;
}