From 93a2fe8aaced79bb8aa62a7aab58989df16cea08 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Wed, 9 Oct 2024 23:57:09 +0100 Subject: [PATCH] Revert "Fix GH-16322: overflow on imageaffine matrix argument." This reverts commit 05114265fbb112793ddf6de953c31ad0cbb2c1d2. --- ext/gd/gd.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/ext/gd/gd.c b/ext/gd/gd.c index eb261231c21e2..3b824430597b6 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -3687,25 +3687,13 @@ PHP_FUNCTION(imageaffine) if ((zval_affine_elem = zend_hash_index_find(Z_ARRVAL_P(z_affine), i)) != NULL) { switch (Z_TYPE_P(zval_affine_elem)) { case IS_LONG: - affine[i] = Z_LVAL_P(zval_affine_elem); - if (ZEND_LONG_EXCEEDS_INT(affine[i])) { - zend_argument_type_error(2, "element %i must be between %d and %d", i, INT_MIN, INT_MAX); - RETURN_THROWS(); - } + affine[i] = Z_LVAL_P(zval_affine_elem); break; case IS_DOUBLE: affine[i] = Z_DVAL_P(zval_affine_elem); - if (ZEND_LONG_EXCEEDS_INT(affine[i])) { - zend_argument_type_error(2, "element %i must be between %d and %d", i, INT_MIN, INT_MAX); - RETURN_THROWS(); - } break; case IS_STRING: affine[i] = zval_get_double(zval_affine_elem); - if (ZEND_LONG_EXCEEDS_INT(affine[i])) { - zend_argument_type_error(2, "element %i must be between %d and %d", i, INT_MIN, INT_MAX); - RETURN_THROWS(); - } break; default: zend_argument_type_error(3, "contains invalid type for element %i", i);