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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user