summary refs log tree commit diff
path: root/bounce.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-07-31 23:51:23 -0400
committerJune McEnroe <june@causal.agency>2020-07-31 23:51:23 -0400
commit8a91c64edf551c3c05483ec3f5c87e8dc27a3cc5 (patch)
treecee269932d1d455b2086db9016bae51a196e3867 /bounce.c
parentUse RAND_bytes instead of arc4random_buf (diff)
downloadpounce-8a91c64edf551c3c05483ec3f5c87e8dc27a3cc5.tar.gz
pounce-8a91c64edf551c3c05483ec3f5c87e8dc27a3cc5.zip
Use snprintf instead of strlcpy
Diffstat (limited to '')
-rw-r--r--bounce.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bounce.c b/bounce.c
index c9b27b0..bee8aca 100644
--- a/bounce.c
+++ b/bounce.c
@@ -352,16 +352,16 @@ int main(int argc, char *argv[]) {
 		switch (opt) {
 			break; case '!': insecure = true;
 			break; case 'A': clientCA = true; caPath = optarg;
-			break; case 'C': strlcpy(certPath, optarg, sizeof(certPath));
+			break; case 'C': snprintf(certPath, sizeof(certPath), "%s", optarg);
 			break; case 'H': bindHost = optarg;
-			break; case 'K': strlcpy(privPath, optarg, sizeof(privPath));
+			break; case 'K': snprintf(privPath, sizeof(privPath), "%s", optarg);
 			break; case 'N': stateNoNames = true;
 			break; case 'P': bindPort = optarg;
 			break; case 'Q': serverQueueInterval = parseInterval(optarg);
 			break; case 'R': blindReq |= capParse(optarg, NULL);
 			break; case 'S': serverBindHost = optarg;
 			break; case 'T': clientSTS = false;
-			break; case 'U': strlcpy(bindPath, optarg, sizeof(bindPath));
+			break; case 'U': snprintf(bindPath, sizeof(bindPath), "%s", optarg);
 			break; case 'W': clientPass = optarg;
 			break; case 'a': blindReq |= CapSASL; plain = optarg;
 			break; case 'c': clientCert = optarg;