summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@ozlabs.org>2023-03-18 17:34:07 +1100
committerPaul Mackerras <paulus@ozlabs.org>2023-03-18 17:34:07 +1100
commitacc6cd4aab0a98d090a5f239cee56c206a9be496 (patch)
treed83bd0215ba50282b91c3caf11d92341bdf49dbe
parent3b0fe68ef1e28bd0db095a1a7c9bdcbe83a58588 (diff)
downloadppp-acc6cd4aab0a98d090a5f239cee56c206a9be496.tar.gz
chat: Fix loop condition to avoid possible 1-byte buffer overrun
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
-rw-r--r--chat/chat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/chat/chat.c b/chat/chat.c
index fa67fd2..336c0f4 100644
--- a/chat/chat.c
+++ b/chat/chat.c
@@ -609,7 +609,7 @@ void terminate(int status)
int c, rep_len;
rep_len = strlen(report_buffer);
- while (rep_len + 1 <= sizeof(report_buffer)) {
+ while (rep_len + 1 < sizeof(report_buffer)) {
alarm(1);
c = get_char();
alarm(0);