X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fprotocol_key.c;h=e393dd64a945216ce28a36b2dbe88661e9678e18;hp=a56ff919df8d1de88b718d502bf6e7c01bc8357a;hb=e810545dc2ae158745624c1575b76c55f883c892;hpb=02746165a21a4a495d0069526c9a2355110a5784 diff --git a/src/protocol_key.c b/src/protocol_key.c index a56ff919..e393dd64 100644 --- a/src/protocol_key.c +++ b/src/protocol_key.c @@ -142,10 +142,11 @@ bool req_key_h(connection_t *c) bool send_ans_key(connection_t *c, const node_t *from, const node_t *to) { - char key[MAX_STRING_SIZE]; + char *key; cp(); + key = alloca(2 * from->keylength + 1); bin2hex(from->key, key, from->keylength); key[from->keylength * 2] = '\0';