Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions ext/soap/php_http.c
Original file line number Diff line number Diff line change
Expand Up @@ -1014,8 +1014,7 @@ int make_http_soap_request(
char *eqpos = strstr(cookie, "=");
char *sempos = strstr(cookie, ";");
if (eqpos != NULL && (sempos == NULL || sempos > eqpos)) {
smart_str name = {0};
int cookie_len;
size_t cookie_len;
zval zcookie;

if (sempos != NULL) {
Expand All @@ -1024,8 +1023,7 @@ int make_http_soap_request(
cookie_len = strlen(cookie)-(eqpos-cookie)-1;
}

smart_str_appendl(&name, cookie, eqpos - cookie);
smart_str_0(&name);
zend_string *name = zend_string_init(cookie, eqpos - cookie, false);

array_init(&zcookie);
add_index_stringl(&zcookie, 0, eqpos + 1, cookie_len);
Expand Down Expand Up @@ -1063,8 +1061,8 @@ int make_http_soap_request(
GC_ADDREF(uri->host);
}

zend_symtable_update(Z_ARRVAL_P(cookies), name.s, &zcookie);
smart_str_free(&name);
zend_symtable_update(Z_ARRVAL_P(cookies), name, &zcookie);
zend_string_release_ex(name, false);
}

cookie_itt = cookie_itt + cookie_len;
Expand Down