1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

websocket: fix segfault

This commit is contained in:
Steffen Vogel 2017-09-19 04:12:34 +02:00
parent 63ad949b99
commit adb81f39d2

View file

@ -148,7 +148,7 @@ int websocket_protocol_cb(struct lws *wsi, enum lws_callback_reasons reason, voi
}
node = strtok(uri, "/.");
if (strlen(node) == 0)
if (!node || strlen(node) == 0)
c->node = NULL;
else {
format = strtok(NULL, "");