bug in syslog(3)

rusty at sdccsu3.UUCP rusty at sdccsu3.UUCP
Thu Mar 8 08:06:27 AEST 1984


there is a bug in syslog(3) that causes lines containing %C where
C isn't 'm' to screw up. syslog(3) is null terminating the string
incorrectly. diffs follow:

*** /src/lib/libc/gen/syslog.c	Mon Jun 27 15:06:44 1983
--- syslog.c	Wed Mar  7 17:01:37 1984
***************
*** 70,76
  			}
  			c = *f++;
  			if (c != 'm') {
! 				*b++ = '%', *b++ = c, *b++ = '\0';
  				continue;
  			}
  			if ((unsigned)errno > sys_nerr)

--- 70,76 -----
  			}
  			c = *f++;
  			if (c != 'm') {
! 				*b++ = '%', *b++ = c;
  				continue;
  			}
  			if ((unsigned)errno > sys_nerr)



More information about the Comp.unix.wizards mailing list