Skip to content

Commit 5adfcfe

Browse files
committed
Merge branch 'PHP-8.0'
* PHP-8.0: Avoid dangling pointer in curl header.str
2 parents 4ba7e5b + db055fd commit 5adfcfe

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ext/curl/interface.c

+1-3
Original file line numberDiff line numberDiff line change
@@ -1626,9 +1626,7 @@ static int curl_debug(CURL *cp, curl_infotype type, char *buf, size_t buf_len, v
16261626
if (ch->header.str) {
16271627
zend_string_release_ex(ch->header.str, 0);
16281628
}
1629-
if (buf_len > 0) {
1630-
ch->header.str = zend_string_init(buf, buf_len, 0);
1631-
}
1629+
ch->header.str = zend_string_init(buf, buf_len, 0);
16321630
}
16331631

16341632
return 0;

0 commit comments

Comments
 (0)