Minor fixes.

This commit is contained in:
Joey Schulze 1997-06-25 13:23:45 +00:00
parent ad6429b459
commit b19b7e0b86

View File

@ -154,7 +154,7 @@
* Added the -i and -I command line switches to signal the currently * Added the -i and -I command line switches to signal the currently
* executing daemon. * executing daemon.
* *
* Tue Nov 19 10:15:36 PST 1996: Lee Olds * Tue Nov 19 10:15:36 PST 1996: Leland Olds <olds@eskimo.com>
* Corrected vulnerability to buffer overruns by rewriting LogLine * Corrected vulnerability to buffer overruns by rewriting LogLine
* routine. Obscenely long kernel messages will now be broken up * routine. Obscenely long kernel messages will now be broken up
* into lines no longer than LOG_LINE_LENGTH. * into lines no longer than LOG_LINE_LENGTH.
@ -614,10 +614,12 @@ static void LogLine(char *ptr, int len)
ptr += delta; ptr += delta;
space -= delta; space -= delta;
len -= delta; len -= delta;
if( space == 0 || len == 0 ) if( space == 0 || len == 0 )
{ {
break; /* full line_buff or end of input buffer */ break; /* full line_buff or end of input buffer */
} }
if( *ptr == '\n' ) /* newline */ if( *ptr == '\n' ) /* newline */
{ {
*line++ = *ptr++; /* copy it in */ *line++ = *ptr++; /* copy it in */