From 386bd4550bbcbb3e271113c2b69e1f116d0f2c25 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Tue, 15 Nov 2016 17:00:55 +0800 Subject: [PATCH] client: protect againt losing ah by lws_client_connect_2 --- lib/client-handshake.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/client-handshake.c b/lib/client-handshake.c index 278bb8d5..a5b4e3fe 100644 --- a/lib/client-handshake.c +++ b/lib/client-handshake.c @@ -18,6 +18,12 @@ lws_client_connect_2(struct lws *wsi) lwsl_client("%s\n", __func__); + if (!wsi->u.hdr.ah) { + cce = "ah was NULL at cc2"; + lwsl_err("%s\n", cce); + goto oom4; + } + /* proxy? */ if (wsi->vhost->http_proxy_port) {