mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-06 21:51:30 +00:00
plugins/php: check return value of uwsgi_response_prepare_headers
Reported by Coverity as CID #1100794
This commit is contained in:
@@ -92,11 +92,13 @@ static int sapi_uwsgi_send_headers(sapi_headers_struct *sapi_headers)
|
||||
int hrc = SG(sapi_headers).http_response_code;
|
||||
if (!hrc) hrc = 200;
|
||||
uwsgi_num2str2n(hrc, status, 4);
|
||||
uwsgi_response_prepare_headers(wsgi_req, status, 3);
|
||||
if (uwsgi_response_prepare_headers(wsgi_req, status, 3))
|
||||
return SAPI_HEADER_SEND_FAILED;
|
||||
}
|
||||
else {
|
||||
char *sl = SG(sapi_headers).http_status_line;
|
||||
uwsgi_response_prepare_headers(wsgi_req, sl + 9 , strlen(sl + 9));
|
||||
if (uwsgi_response_prepare_headers(wsgi_req, sl + 9 , strlen(sl + 9)))
|
||||
return SAPI_HEADER_SEND_FAILED;
|
||||
}
|
||||
|
||||
h = zend_llist_get_first_ex(&sapi_headers->headers, &pos);
|
||||
|
||||
Reference in New Issue
Block a user