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:
6f11c13
)
coverity 181575: check vhost iface non-null if using via bind_iface
author
Andy Green
<andy@warmcat.com>
Wed, 19 Jul 2017 06:16:32 +0000
(14:16 +0800)
committer
Andy Green
<andy@warmcat.com>
Wed, 19 Jul 2017 06:16:32 +0000
(14:16 +0800)
lib/lws-plat-unix.c
patch
|
blob
|
history
diff --git
a/lib/lws-plat-unix.c
b/lib/lws-plat-unix.c
index
07b7edc
..
28e5bbe
100644
(file)
--- a/
lib/lws-plat-unix.c
+++ b/
lib/lws-plat-unix.c
@@
-256,7
+256,7
@@
lws_plat_set_socket_options(struct lws_vhost *vhost, int fd)
}
#if defined(SO_BINDTODEVICE)
- if (vhost->bind_iface) {
+ if (vhost->bind_iface
&& vhost->iface
) {
lwsl_info("binding listen skt to %s using SO_BINDTODEVICE\n", vhost->iface);
if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, vhost->iface,
strlen(vhost->iface)) < 0) {