plugins/php: check return value of uwsgi_response_prepare_headers

Reported by Coverity as CID #1100794
This commit is contained in:
Riccardo Magliocchetti
2013-12-28 16:06:58 +01:00
parent 79222adfe7
commit b5c19bc1f8
+4 -2
View File
@@ -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);