From owner-freebsd-commit Wed Oct 4 17:12:55 1995 Return-Path: owner-commit Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id RAA09928 for freebsd-commit-outgoing; Wed, 4 Oct 1995 17:12:55 -0700 Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id RAA09916 for cvs-all-outgoing; Wed, 4 Oct 1995 17:12:52 -0700 Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id RAA09872 for cvs-lib-outgoing; Wed, 4 Oct 1995 17:11:30 -0700 Received: (from peter@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id RAA09861 ; Wed, 4 Oct 1995 17:11:18 -0700 Date: Wed, 4 Oct 1995 17:11:18 -0700 From: Peter Wemm Message-Id: <199510050011.RAA09861@freefall.freebsd.org> To: CVS-commiters, cvs-lib Subject: cvs commit: src/lib/libc/gen syslog.c Sender: owner-commit@FreeBSD.org Precedence: bulk peter 95/10/04 17:11:17 Modified: lib/libc/gen syslog.c Log: Fix the problem that I aroused with the last commit.. What was happening, is if syslogd was not running, syslog() would do a strcat("\r\n") on a non-null-terminated buffer, and write it to the console. This meant that sometimes extra characters could be written to the console during boot, depending on the stack contents. This totally avoids the potential problem by using writev() like the rest of the does, and avoid modifying the buffer after the trouble we've gone to to carefully protect it. This is actually a trivial fix, in spite of the long commit message.. :-) It only appeared during boot and shutdown with syslogd stopped.