Skip to content

Commit db055fd

Browse files
committed
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4: Avoid dangling pointer in curl header.str
2 parents 416dd52 + 8c292a2 commit db055fd

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Diff for: ext/curl/interface.c

+1-3
Original file line numberDiff line numberDiff line change
@@ -1638,9 +1638,7 @@ static int curl_debug(CURL *cp, curl_infotype type, char *buf, size_t buf_len, v
16381638
if (ch->header.str) {
16391639
zend_string_release_ex(ch->header.str, 0);
16401640
}
1641-
if (buf_len > 0) {
1642-
ch->header.str = zend_string_init(buf, buf_len, 0);
1643-
}
1641+
ch->header.str = zend_string_init(buf, buf_len, 0);
16441642
}
16451643

16461644
return 0;

0 commit comments

Comments
 (0)