mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
ss: reject direct protocol metadata if NULL ss wsi
The ss wsi may be NULL after any time around the event loop. Make sure we check that before we start trying to use it.
This commit is contained in:
parent
1027d3a740
commit
3eae5f8bca
1 changed files with 1 additions and 1 deletions
|
@ -177,7 +177,7 @@ lws_ss_get_metadata(struct lws_ss_handle *h, const char *name,
|
|||
return 0;
|
||||
}
|
||||
#if defined(LWS_WITH_SS_DIRECT_PROTOCOL_STR)
|
||||
if (!(h->policy->flags & LWSSSPOLF_DIRECT_PROTO_STR))
|
||||
if (!(h->policy->flags & LWSSSPOLF_DIRECT_PROTO_STR) || !h->wsi)
|
||||
goto bail;
|
||||
|
||||
n = lws_http_string_to_known_header(name, strlen(name));
|
||||
|
|
Loading…
Add table
Reference in a new issue