From e9514f065380123e58c5ea37080f158b36d23154 Mon Sep 17 00:00:00 2001 From: Ramakrishnan Muthukrishnan Date: Wed, 12 Jan 2022 11:44:36 +0530 Subject: [PATCH] send_reply() relies on strlen() to get the bytes to send, so terminate properly --- rigctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/rigctl.c b/rigctl.c index fc5c66b..0ff553b 100644 --- a/rigctl.c +++ b/rigctl.c @@ -1819,6 +1819,7 @@ gboolean parse_extended_cmd(char *command, CLIENT *client) { case 'G': // ZZMG // set/read mic gain if (command[4] == ';') { + memset(reply, \0, 9); sprintf(reply, "ZZMG%03d;", (int)(((mic_gain + 12.0) / 72.0) * 100.0)); send_resp(client->fd, reply); } else if (command[7] == ';') { -- 2.45.2