Skip to content

Commit 0ec7bfa

Browse files
committed
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4: Add missing derefs in CurlFile
2 parents f1a988a + 54fa0a6 commit 0ec7bfa

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
@@ -2046,6 +2046,7 @@ static inline int build_mime_structure_from_hash(php_curl *ch, zval *zpostfields
20462046
#endif
20472047

20482048
prop = zend_read_property(curl_CURLFile_class, Z_OBJ_P(current), "name", sizeof("name")-1, 0, &rv);
2049+
ZVAL_DEREF(prop);
20492050
if (Z_TYPE_P(prop) != IS_STRING) {
20502051
php_error_docref(NULL, E_WARNING, "Invalid filename for key %s", ZSTR_VAL(string_key));
20512052
} else {
@@ -2056,10 +2057,12 @@ static inline int build_mime_structure_from_hash(php_curl *ch, zval *zpostfields
20562057
}
20572058

20582059
prop = zend_read_property(curl_CURLFile_class, Z_OBJ_P(current), "mime", sizeof("mime")-1, 0, &rv);
2060+
ZVAL_DEREF(prop);
20592061
if (Z_TYPE_P(prop) == IS_STRING && Z_STRLEN_P(prop) > 0) {
20602062
type = Z_STRVAL_P(prop);
20612063
}
20622064
prop = zend_read_property(curl_CURLFile_class, Z_OBJ_P(current), "postname", sizeof("postname")-1, 0, &rv);
2065+
ZVAL_DEREF(prop);
20632066
if (Z_TYPE_P(prop) == IS_STRING && Z_STRLEN_P(prop) > 0) {
20642067
filename = Z_STRVAL_P(prop);
20652068
}

0 commit comments

Comments
 (0)