diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2021-02-02 10:32:25 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2021-02-02 10:32:25 +0100 |
commit | 8c00c919e38ea9189745fb49da13df06077df21b (patch) | |
tree | 79b14974b159158b60eeae34f9d9377aac971334 | |
parent | 9576a2ad1ec3ee9d4842bcad02088c52ac83f708 (diff) | |
parent | 0ec7bfaa43e8eaf23a35b2850e0b9085b380dd1f (diff) | |
download | php-git-8c00c919e38ea9189745fb49da13df06077df21b.tar.gz |
Merge branch 'PHP-8.0'
* PHP-8.0:
Add missing derefs in CurlFile
-rw-r--r-- | ext/curl/interface.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 1044031a88..92dfc918cb 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -2018,6 +2018,7 @@ static inline int build_mime_structure_from_hash(php_curl *ch, zval *zpostfields #endif prop = zend_read_property(curl_CURLFile_class, Z_OBJ_P(current), "name", sizeof("name")-1, 0, &rv); + ZVAL_DEREF(prop); if (Z_TYPE_P(prop) != IS_STRING) { php_error_docref(NULL, E_WARNING, "Invalid filename for key %s", ZSTR_VAL(string_key)); } else { @@ -2028,10 +2029,12 @@ static inline int build_mime_structure_from_hash(php_curl *ch, zval *zpostfields } prop = zend_read_property(curl_CURLFile_class, Z_OBJ_P(current), "mime", sizeof("mime")-1, 0, &rv); + ZVAL_DEREF(prop); if (Z_TYPE_P(prop) == IS_STRING && Z_STRLEN_P(prop) > 0) { type = Z_STRVAL_P(prop); } prop = zend_read_property(curl_CURLFile_class, Z_OBJ_P(current), "postname", sizeof("postname")-1, 0, &rv); + ZVAL_DEREF(prop); if (Z_TYPE_P(prop) == IS_STRING && Z_STRLEN_P(prop) > 0) { filename = Z_STRVAL_P(prop); } |