1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

83674 dereference after NULL check

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2014-11-30 12:43:51 +08:00
parent 6a33759bb1
commit 47afcddccf

View file

@ -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;