X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fprotocol.c;h=52300632ad2286b923b60a7fa0d417d4e9d84c3a;hp=be3b5d1ce14e41f538a5563f55d9a5b4dbf61123;hb=4dee76522e177dcb4af5d6d844a5f3b74070e4b7;hpb=bfc5d6014e3c1563f7b6a2f10698e9ba23ba3e96 diff --git a/src/protocol.c b/src/protocol.c index be3b5d1c..52300632 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: protocol.c,v 1.28.4.89 2001/05/24 21:52:26 guus Exp $ + $Id: protocol.c,v 1.28.4.90 2001/05/25 08:36:11 guus Exp $ */ #include "config.h" @@ -1068,6 +1068,7 @@ cp cl->last_ping_time = time(NULL); RAND_bytes(salt, SALTLEN); bin2hex(salt, salt, SALTLEN); + salt[SALTLEN*2] = '\0'; cp return send_request(cl, "%d %s", PING, salt); } @@ -1084,6 +1085,7 @@ int send_pong(connection_t *cl) cp RAND_bytes(salt, SALTLEN); bin2hex(salt, salt, SALTLEN); + salt[SALTLEN*2] = '\0'; cp return send_request(cl, "%d %s", PONG, salt); }