X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Finvitation.c;h=28f9f8ce0755468f8c4abea0f9cc07e016011900;hb=53036a58790168e18f524bd923f9a7d34691ba2d;hp=7fb96dacf00cb414e417f05964945c47e44a71ab;hpb=f0e7e6b03e34e69cac5b01a2d943ad3b9b59d36c;p=tinc diff --git a/src/invitation.c b/src/invitation.c index 7fb96dac..28f9f8ce 100644 --- a/src/invitation.c +++ b/src/invitation.c @@ -613,6 +613,7 @@ make_names: FILE *fh = fopen(filename, "w"); if(!fh) { fprintf(stderr, "Could not create file %s: %s\n", filename, strerror(errno)); + fclose(f); return false; } @@ -906,7 +907,7 @@ int cmd_join(int argc, char *argv[]) { if(!port || !*port) port = "655"; - if(!b64decode(slash, hash, 18) || !b64decode(slash + 24, cookie, 18)) + if(!b64decode(slash, hash, 24) || !b64decode(slash + 24, cookie, 24)) goto invalid; // Generate a throw-away key for the invitation.