From 62031be5f0a4b7e37a99cce43d0a77a67690e791 Mon Sep 17 00:00:00 2001 From: Saverio Proto Date: Tue, 3 Jun 2014 16:41:08 +0200 Subject: [PATCH] meshlink_join: fix Segmentation Fault when invitation URL is missing the port number --- src/meshlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/meshlink.c b/src/meshlink.c index fc8408ad..511a6d15 100644 --- a/src/meshlink.c +++ b/src/meshlink.c @@ -1158,7 +1158,7 @@ bool meshlink_join(meshlink_handle_t *mesh, const char *invitation) { *port++ = 0; } - if(!*port) + if(!port) port = "655"; if(!b64decode(slash, mesh->hash, 18) || !b64decode(slash + 24, mesh->cookie, 18)) -- 2.39.5