From 19a4966bff857bea391adb9de0c4fe6b4b776dd5 Mon Sep 17 00:00:00 2001 From: FlUxIuS Date: Fri, 6 Jan 2023 11:55:14 +0100 Subject: [PATCH] Fix bug with command lengths over 127 from @Will-W --- CLI/CLIServer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CLI/CLIServer.cpp b/CLI/CLIServer.cpp index 9f6ff2f..debee4e 100644 --- a/CLI/CLIServer.cpp +++ b/CLI/CLIServer.cpp @@ -202,7 +202,7 @@ void Parser::cliServer() close(i); continue; // go to next socket } - if (len < (int) sizeof(len)) // should never get here + if (nread < (int) sizeof(len)) // should never get here { char buf[BUFSIZ]; sprintf(buf, "Unable to read complete length, s.b. %d bytes, got %d bytes\n", sizeof(len), len);