From f5b784887f754f3382f532b897c9907e76ccea5c Mon Sep 17 00:00:00 2001 From: christos Date: Sat, 18 Mar 2006 03:45:34 +0000 Subject: [PATCH] Coverity CID 1462: Static buffer overrun; off by 2. --- dist/pppd/chat/chat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/pppd/chat/chat.c b/dist/pppd/chat/chat.c index f8f23d727f8a..9e0f40e1f421 100644 --- a/dist/pppd/chat/chat.c +++ b/dist/pppd/chat/chat.c @@ -1,4 +1,4 @@ -/* $NetBSD: chat.c,v 1.4 2006/03/18 03:43:13 christos Exp $ */ +/* $NetBSD: chat.c,v 1.5 2006/03/18 03:45:34 christos Exp $ */ /* * Chat -- a program for automatic session establishment (i.e. dial @@ -93,7 +93,7 @@ #if 0 static const char rcsid[] = "Id: chat.c,v 1.30 2004/01/17 05:47:55 carlsonj Exp"; #else -__RCSID("$NetBSD: chat.c,v 1.4 2006/03/18 03:43:13 christos Exp $"); +__RCSID("$NetBSD: chat.c,v 1.5 2006/03/18 03:45:34 christos Exp $"); #endif #endif @@ -646,7 +646,7 @@ int status; int c, rep_len; rep_len = strlen(report_buffer); - while (rep_len + 1 <= sizeof(report_buffer)) { + while (rep_len < sizeof(report_buffer) - 1) { alarm(1); c = get_char(); alarm(0);