From 47afcddccffeef6bf7caf1cc7144fe4d949c50c4 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Sun, 30 Nov 2014 12:43:51 +0800 Subject: [PATCH] 83674 dereference after NULL check Signed-off-by: Andy Green --- lib/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/client.c b/lib/client.c index 3344c4f0..a7158d3f 100755 --- a/lib/client.c +++ b/lib/client.c @@ -560,7 +560,7 @@ lws_client_interpret_server_handshake(struct libwebsocket_context *context, p = lws_hdr_simple_ptr(wsi, WSI_TOKEN_PROTOCOL); len = strlen(p); - while (*pc && !okay) { + while (pc && *pc && !okay) { if (!strncmp(pc, p, len) && (pc[len] == ',' || pc[len] == '\0')) { okay = 1;