Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/usr.sbin/syslogd Pull up 1.40: range check in printline...



details:   https://anonhg.NetBSD.org/src/rev/4c26fd04dc12
branches:  netbsd-1-5
changeset: 489452:4c26fd04dc12
user:      sommerfeld <sommerfeld%NetBSD.org@localhost>
date:      Wed Sep 13 15:57:02 2000 +0000

description:
Pull up 1.40: range check in printline() correctly.

diffstat:

 usr.sbin/syslogd/syslogd.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 23f21ce4cbf2 -r 4c26fd04dc12 usr.sbin/syslogd/syslogd.c
--- a/usr.sbin/syslogd/syslogd.c        Wed Sep 13 12:43:25 2000 +0000
+++ b/usr.sbin/syslogd/syslogd.c        Wed Sep 13 15:57:02 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: syslogd.c,v 1.34.4.2 2000/07/02 02:18:10 jwise Exp $   */
+/*     $NetBSD: syslogd.c,v 1.34.4.3 2000/09/13 15:57:02 sommerfeld Exp $      */
 
 /*
  * Copyright (c) 1983, 1988, 1993, 1994
@@ -43,7 +43,7 @@
 #if 0
 static char sccsid[] = "@(#)syslogd.c  8.3 (Berkeley) 4/4/94";
 #else
-__RCSID("$NetBSD: syslogd.c,v 1.34.4.2 2000/07/02 02:18:10 jwise Exp $");
+__RCSID("$NetBSD: syslogd.c,v 1.34.4.3 2000/09/13 15:57:02 sommerfeld Exp $");
 #endif
 #endif /* not lint */
 
@@ -533,7 +533,7 @@
        q = line;
 
        while ((c = *p++ & 0177) != '\0' &&
-           q < &line[sizeof(line) - 1])
+           q < &line[sizeof(line) - 2])
                if (iscntrl(c))
                        if (c == '\n')
                                *q++ = ' ';



Home | Main Index | Thread Index | Old Index