From fbbd53914371524f4470ed4ac50000fd43225987 Mon Sep 17 00:00:00 2001 From: Falk Werner Date: Thu, 18 Apr 2019 20:30:18 +0200 Subject: [PATCH] fixes invalid read if www is not specified --- lib/webfuse/adapter/impl/server_protocol.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/webfuse/adapter/impl/server_protocol.c b/lib/webfuse/adapter/impl/server_protocol.c index 27a6fd8..fa5c837 100644 --- a/lib/webfuse/adapter/impl/server_protocol.c +++ b/lib/webfuse/adapter/impl/server_protocol.c @@ -18,6 +18,11 @@ static int wf_impl_server_protocol_callback( size_t len) { struct lws_protocols const * ws_protocol = lws_get_protocol(wsi); + if (NULL == ws_protocol) + { + return 0; + } + struct wf_server_protocol * protocol = ws_protocol->user; wf_impl_timeout_manager_check(&protocol->timeout_manager);