X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fnet_packet.c;h=24ebdff84bee65c01a9b101944763adee8c47e05;hb=b2701c7c54b11cda71461c5dbbc985476bf5b221;hp=7bb182db22822c03b66cefd1b842c13234421a84;hpb=171810e42712c7cfcd7bcfb5fe6c35f2a935e4c6;p=tinc diff --git a/src/net_packet.c b/src/net_packet.c index 7bb182db..24ebdff8 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -967,8 +967,8 @@ bool send_sptps_data(node_t *to, node_t *from, int type, const void *data, size_ return send_sptps_tcppacket(to->nexthop->connection, buf, sizeof(buf)); } - char buf[len * 4 / 3 + 5]; - b64encode(data, buf, len); + char buf[B64_SIZE(len)]; + b64encode_tinc(data, buf, len); /* If this is a handshake packet, use ANS_KEY instead of REQ_KEY, for two reasons: - We don't want intermediate nodes to switch to UDP to relay these packets;