X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fprotocol_key.c;fp=src%2Fprotocol_key.c;h=b326b8d70a1fb75657f95080dec51079fa876ab1;hp=22692bb614e97632d2224bedbd77b1fb28647976;hb=9e3ca397735077f85bbde48c36e1b3e0fa950988;hpb=e2e6ec8050274b0a8678d6fc263e7dc4ef66feae diff --git a/src/protocol_key.c b/src/protocol_key.c index 22692bb6..b326b8d7 100644 --- a/src/protocol_key.c +++ b/src/protocol_key.c @@ -145,8 +145,6 @@ bool req_key_h(connection_t *c) { } bool send_ans_key(node_t *to) { - char *key; - // Set key parameters to->incipher = myself->incipher; to->inkeylength = myself->inkeylength; @@ -168,7 +166,7 @@ bool send_ans_key(node_t *to) { memset(to->late, 0, sizeof(to->late)); // Convert to hexadecimal and send - key = alloca(2 * to->inkeylength + 1); + char key[2 * to->inkeylength + 1]; bin2hex(to->inkey, key, to->inkeylength); key[to->inkeylength * 2] = '\0';