diff options
author | Andy Green <andy@warmcat.com> | 2016-11-15 17:01:19 +0800 |
---|---|---|
committer | Andy Green <andy@warmcat.com> | 2016-11-15 17:01:19 +0800 |
commit | bfffba9e09080af34200ede1857e73153cbd905f (patch) | |
tree | 1f61507d94da55e80296f426c019bce608b24f2f | |
parent | fa7acb3b88e86425db7c6eedfb60f1cc605ace11 (diff) | |
download | libwebsockets-bfffba9e09080af34200ede1857e73153cbd905f.tar.gz libwebsockets-bfffba9e09080af34200ede1857e73153cbd905f.tar.bz2 libwebsockets-bfffba9e09080af34200ede1857e73153cbd905f.zip |
client: protect againt losing ah by lws_client_connect_2
-rw-r--r-- | lib/client-handshake.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/client-handshake.c b/lib/client-handshake.c index 01a74d78..f78f4f19 100644 --- a/lib/client-handshake.c +++ b/lib/client-handshake.c @@ -19,6 +19,11 @@ lws_client_connect_2(struct lws *wsi) lwsl_client("%s\n", __func__); + if (!wsi->u.hdr.ah) { + lwsl_err("ah was NULL at cc2\n"); + goto oom4; + } + /* proxy? */ if (context->http_proxy_port) { |