Skip to content

Commit 415fcc2

Browse files
committed
MFH
1 parent c113584 commit 415fcc2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/curl/curl.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,8 @@ PHP_FUNCTION(curl_setopt)
728728
SEPARATE_ZVAL(current);
729729
convert_to_string_ex(current);
730730

731-
indiv = estrndup(Z_STRVAL_PP(current), Z_STRLEN_PP(current));
731+
indiv = estrndup(Z_STRVAL_PP(current), Z_STRLEN_PP(current) + 1);
732+
indiv[Z_STRLEN_PP(current)] = '\0';
732733
slist = curl_slist_append(slist, indiv);
733734
if (! slist) {
734735
efree(indiv);

0 commit comments

Comments
 (0)