Mon Sep 18 09:10:47 CEST 2000: Martin Schulze <joey@infodrom.ffis.de>

Fixed bug in printchopped() that caused syslogd to emit
      kern.emerg messages when splitting long lines.  Thanks to
      Daniel Jacobowitz <dan@debian.org> for the fix.
This commit is contained in:
Joey Schulze 2000-09-18 07:13:08 +00:00
parent 03f751675f
commit 5433c6018b
2 changed files with 11 additions and 2 deletions

View File

@ -7,6 +7,8 @@ Version 1.4
partition with no open file descriptor left over. partition with no open file descriptor left over.
. Solar Designer <solar@false.com> . Solar Designer <solar@false.com>
- printline() fixes - printline() fixes
. Daniel Jacobowitz <dan@debian.org>
- printchopped() fix
. Keith Owens <kaos@ocs.com.au> . Keith Owens <kaos@ocs.com.au>
- Fixed bug that caused klogd to die if there is no sym_array available. - Fixed bug that caused klogd to die if there is no sym_array available.
- When symbols are expanded, print the line twice. Once with - When symbols are expanded, print the line twice. Once with

View File

@ -424,7 +424,13 @@ static char sccsid[] = "@(#)syslogd.c 5.27 (Berkeley) 10/10/88";
* <solar@false.com>. * <solar@false.com>.
* *
* Sun Sep 17 21:26:16 CEST 2000: Martin Schulze <joey@infodrom.ffis.de> * Sun Sep 17 21:26:16 CEST 2000: Martin Schulze <joey@infodrom.ffis.de>
* Don't close open sockets upon reload. Thanks to Bill Nottingham. * Don't close open sockets upon reload. Thanks to Bill
* Nottingham.
*
* Mon Sep 18 09:10:47 CEST 2000: Martin Schulze <joey@infodrom.ffis.de>
* Fixed bug in printchopped() that caused syslogd to emit
* kern.emerg messages when splitting long lines. Thanks to
* Daniel Jacobowitz <dan@debian.org> for the fix.
*/ */
@ -1403,7 +1409,8 @@ void printchopped(hname, msg, len, fd)
msg[len] = '\0'; msg[len] = '\0';
for(p= msg+len-1; *p != '\0' && p > msg; ) for(p= msg+len-1; *p != '\0' && p > msg; )
--p; --p;
ptlngth = strlen(++p); if(*p == '\0') p++;
ptlngth = strlen(p);
if ( (parts[fd] = malloc(ptlngth + 1)) == (char *) 0 ) if ( (parts[fd] = malloc(ptlngth + 1)) == (char *) 0 )
logerror("Cannot allocate memory for message part."); logerror("Cannot allocate memory for message part.");
else else