Skip to content

Commit 8c00c91

Browse files
committed
Merge branch 'PHP-8.0'
* PHP-8.0: Add missing derefs in CurlFile
2 parents 9576a2a + 0ec7bfa commit 8c00c91

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ext/curl/interface.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2018,6 +2018,7 @@ static inline int build_mime_structure_from_hash(php_curl *ch, zval *zpostfields
20182018
#endif
20192019

20202020
prop = zend_read_property(curl_CURLFile_class, Z_OBJ_P(current), "name", sizeof("name")-1, 0, &rv);
2021+
ZVAL_DEREF(prop);
20212022
if (Z_TYPE_P(prop) != IS_STRING) {
20222023
php_error_docref(NULL, E_WARNING, "Invalid filename for key %s", ZSTR_VAL(string_key));
20232024
} else {
@@ -2028,10 +2029,12 @@ static inline int build_mime_structure_from_hash(php_curl *ch, zval *zpostfields
20282029
}
20292030

20302031
prop = zend_read_property(curl_CURLFile_class, Z_OBJ_P(current), "mime", sizeof("mime")-1, 0, &rv);
2032+
ZVAL_DEREF(prop);
20312033
if (Z_TYPE_P(prop) == IS_STRING && Z_STRLEN_P(prop) > 0) {
20322034
type = Z_STRVAL_P(prop);
20332035
}
20342036
prop = zend_read_property(curl_CURLFile_class, Z_OBJ_P(current), "postname", sizeof("postname")-1, 0, &rv);
2037+
ZVAL_DEREF(prop);
20352038
if (Z_TYPE_P(prop) == IS_STRING && Z_STRLEN_P(prop) > 0) {
20362039
filename = Z_STRVAL_P(prop);
20372040
}

0 commit comments

Comments
 (0)