]> git.meshlink.io Git - meshlink/blobdiff - src/meshlink.c
meshlink_join: fix Segmentation Fault when invitation URL is missing the port number
[meshlink] / src / meshlink.c
index fc8408ad1309843d9641df75a47323f0411b192d..511a6d15546850ffe8b45d82b3c460bb75694cc2 100644 (file)
@@ -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))