Skip to content

Commit

Permalink
Merge branch 'PHP-8.0'
Browse files Browse the repository at this point in the history
* PHP-8.0:
  Avoid dangling pointer in curl header.str
  • Loading branch information
nikic committed Aug 31, 2021
2 parents 4ba7e5b + db055fd commit 5adfcfe
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ext/curl/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -1626,9 +1626,7 @@ 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);
}
ch->header.str = zend_string_init(buf, buf_len, 0);
}

return 0;
Expand Down

0 comments on commit 5adfcfe

Please sign in to comment.