Merge branch 'PHP-8.0'

* PHP-8.0:
  Avoid dangling pointer in curl header.str
This commit is contained in:
Nikita Popov 2021-08-31 17:25:38 +02:00
commit 5adfcfe746

View file

@ -1626,10 +1626,8 @@ static int curl_debug(CURL *cp, curl_infotype type, char *buf, size_t buf_len, v
if (ch->header.str) {
zend_string_release_ex(ch->header.str, 0);
}
if (buf_len > 0) {
ch->header.str = zend_string_init(buf, buf_len, 0);
}
}
return 0;
}