From 50427b7b632ebb13215bd9f1f4cfee1b2202cdf2 Mon Sep 17 00:00:00 2001 From: aabacchus Date: Sat, 27 May 2023 19:27:02 +0100 Subject: send string length in client-test --- client-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'client-test.c') diff --git a/client-test.c b/client-test.c index 1a8638d..e3097f7 100644 --- a/client-test.c +++ b/client-test.c @@ -22,7 +22,7 @@ main(void) { sizeof(SOCK_PATH) + sizeof(remote.sun_family)) == -1) err(1, "connect"); char msg[] = "Hi, test message 1!\n"; - if (send(s, msg, sizeof(msg), 0) == -1) + if (send(s, msg, sizeof(msg)-1, 0) == -1) err(1, "send"); close(s); return 0; -- cgit 1.4.1-2-gfad0