Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Oct 1995 17:11:18 -0700
From:      Peter Wemm <peter>
To:        CVS-commiters, cvs-lib
Subject:   cvs commit: src/lib/libc/gen syslog.c
Message-ID:  <199510050011.RAA09861@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199510050011.RAA09861>