From: Paul Mackerras Date: Sat, 18 Mar 2023 06:34:07 +0000 (+1100) Subject: chat: Fix loop condition to avoid possible 1-byte buffer overrun X-Git-Tag: ppp-2.5.0~3 X-Git-Url: https://git.ozlabs.org/?a=commitdiff_plain;h=acc6cd4aab0a98d090a5f239cee56c206a9be496;p=ppp.git chat: Fix loop condition to avoid possible 1-byte buffer overrun Signed-off-by: Paul Mackerras --- 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);