projects
/
platform
/
upstream
/
libwebsockets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4adf590
)
bind protocol: fix for NULL names
author
Silas Parker
<skyhisi@user.github.invalid.com>
Fri, 7 Apr 2017 10:22:54 +0000
(18:22 +0800)
committer
Andy Green
<andy@warmcat.com>
Fri, 7 Apr 2017 10:22:54 +0000
(18:22 +0800)
lib/libwebsockets.c
patch
|
blob
|
history
diff --git
a/lib/libwebsockets.c
b/lib/libwebsockets.c
index
e4a42dc
..
6917070
100755
(executable)
--- a/
lib/libwebsockets.c
+++ b/
lib/libwebsockets.c
@@
-200,7
+200,7
@@
lws_bind_protocol(struct lws *wsi, const struct lws_protocols *p)
vpo = vp;
while (n--) {
- if (!strcmp(p->name, vp->name)) {
+ if (
p->name && vp->name &&
!strcmp(p->name, vp->name)) {
hit = 1;
lws_same_vh_protocol_insert(wsi, vp - vpo);
break;