A small fix to syslog, that was seen in cron. When the first notice in syslog, about running a cronjob, is as string longer then the next one, then some homeless bytes are printed from the old buffer. Notes: Sun Aug 7 10:46:55 EDT 2005 rsc I don't see how the problem you describe can happen (vseprint is supposed to NUL-terminate its destination always), and your solution (not printing the message at all?!?) doesn't seem like a very useful response at all. Reference: /n/sources/patch/sorry/libc-syslog-buffer Date: Sat Aug 6 16:33:47 CES 2005 Reviewed-by: rsc --- /sys/src/libc/9sys/syslog.c Sat Aug 6 16:33:35 2005 +++ /sys/src/libc/9sys/syslog.c Sat Aug 6 16:33:31 2005 @@ -95,13 +95,11 @@ ctim = ctime(time(0)); werrstr(err); + memset(buf, 0, sizeof(buf)); p = buf + snprint(buf, sizeof(buf)-1, "%s ", sysname()); strncpy(p, ctim+4, 15); p += 15; *p++ = ' '; - va_start(arg, fmt); - p = vseprint(p, buf+sizeof(buf)-1, fmt, arg); - va_end(arg); *p++ = '\n'; n = p - buf;