mirror of
https://github.com/apache/httpd.git
synced 2025-08-01 07:26:57 +03:00
check apreq_cookie_make return value
Github: closes #302 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908673 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@ -516,6 +516,8 @@ static apr_status_t cgi_jar(apreq_handle_t *handle,
|
||||
if (val == NULL)
|
||||
val = "";
|
||||
p = apreq_cookie_make(handle->pool, name, strlen(name), val, strlen(val));
|
||||
if (p == NULL)
|
||||
return APR_ENOMEM;
|
||||
apreq_cookie_tainted_on(p);
|
||||
apreq_value_table_add(&p->v, req->jar);
|
||||
}
|
||||
@ -606,6 +608,8 @@ static apreq_cookie_t *cgi_jar_get(apreq_handle_t *handle,
|
||||
if (val == NULL)
|
||||
return NULL;
|
||||
p = apreq_cookie_make(handle->pool, name, strlen(name), val, strlen(val));
|
||||
if (p == NULL)
|
||||
return NULL;
|
||||
apreq_cookie_tainted_on(p);
|
||||
apreq_value_table_add(&p->v, req->jar);
|
||||
val = p->v.data;
|
||||
|
Reference in New Issue
Block a user