From f4180224b26bbcf0d66bafa5099d1a3e7a97889c Mon Sep 17 00:00:00 2001 From: Falk Werner <47070255+falk-werner@users.noreply.github.com> Date: Thu, 25 Apr 2019 20:06:54 +0200 Subject: [PATCH] fixes invalid read if www is not specified (#28) --- 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);