From 0a7d178134a8081e5e24931d3ecbe4d1008def63 Mon Sep 17 00:00:00 2001 From: Gilles Depeyrot Date: Thu, 15 Jul 2021 14:43:22 +0200 Subject: [PATCH] properly terminate string which recvfrom does not do --- src/manager.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/manager.c b/src/manager.c index fe505127..64f4d244 100644 --- a/src/manager.c +++ b/src/manager.c @@ -614,6 +614,9 @@ manager_recv_cb(EV_P_ ev_io *w, int revents) return; } + // properly terminate string which recvfrom does not do + buf[r] = '\0'; + char *action = get_action(buf, r); if (action == NULL) { return;