From: Guus Sliepen Date: Sat, 21 Jul 2012 13:50:50 +0000 (+0200) Subject: Fix some compiler warnings. X-Git-Tag: release-1.1pre3~87 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7303b512b0e4f0d9cbc3236e846b2618f527b830;p=oweals%2Ftinc.git Fix some compiler warnings. --- diff --git a/src/protocol_auth.c b/src/protocol_auth.c index 175aee0..790d324 100644 --- a/src/protocol_auth.c +++ b/src/protocol_auth.c @@ -65,7 +65,7 @@ static bool send_proxyrequest(connection_t *c) { memcpy(s4req + 2, &c->address.in.sin_port, 2); memcpy(s4req + 4, &c->address.in.sin_addr, 4); if(proxyuser) - strcpy(s4req + 8, proxyuser); + memcpy(s4req + 8, proxyuser, strlen(proxyuser)); s4req[sizeof s4req - 1] = 0; c->tcplen = 8; return send_meta(c, s4req, sizeof s4req); diff --git a/src/tincctl.c b/src/tincctl.c index f547639..24359ab 100644 --- a/src/tincctl.c +++ b/src/tincctl.c @@ -1194,7 +1194,7 @@ static int cmd_config(int argc, char *argv[]) { while(fgets(buf1, sizeof buf1, f)) { buf1[sizeof buf1 - 1] = 0; - strcpy(buf2, buf1); + strncpy(buf2, buf1, sizeof buf2); // Parse line in a simple way char *bvalue;