mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-16 00:00:07 +01:00
coverity 188321: reject wsi with NULL vhost earlier
This commit is contained in:
parent
ea8c44d799
commit
da38a17a31
1 changed files with 4 additions and 1 deletions
|
@ -383,7 +383,10 @@ lws_http_serve(struct lws *wsi, char *uri, const char *origin,
|
|||
int n;
|
||||
|
||||
wsi->handling_404 = 0;
|
||||
if (wsi->vhost && wsi->vhost->error_document_404 &&
|
||||
if (!wsi->vhost)
|
||||
return -1;
|
||||
|
||||
if (wsi->vhost->error_document_404 &&
|
||||
!strcmp(uri, wsi->vhost->error_document_404))
|
||||
wsi->handling_404 = 1;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue