From: Saverio Proto Date: Tue, 3 Jun 2014 14:41:08 +0000 (+0200) Subject: meshlink_join: fix Segmentation Fault when invitation URL is missing the port number X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=62031be5f0a4b7e37a99cce43d0a77a67690e791;p=meshlink meshlink_join: fix Segmentation Fault when invitation URL is missing the port number --- 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))