Re: bug in syslog-ng?
On Tue, Oct 14, 2003 at 11:33:10AM +0200, Marc Silver wrote:
Hi Balázs,
I just upgraded from syslog-ng-1.6.0rc2 to syslog-ng-1.6.0rc4 and have noticed that there is now an odd binary character in my pix log files. Is this a bug, or something new in syslog-ng? A quick strace shows:
write(10, "Oct 14 11:25:40\0 pixname %PIX-4-"..., 133) = 133
As you can see, it's writing a \0 after the datestamp, which it didn't seem to be doing before.
Any information you could provide on this would help.
it is definitely a bug, and is caused by the new PIX date stamp parsing code. This patch seems to fix the bug for me: diff -u syslog-ng/src/log.c:1.31 syslog-ng/src/log.c:1.32 --- syslog-ng/src/log.c:1.31 Fri Oct 3 16:16:38 2003 +++ syslog-ng/src/log.c Wed Oct 15 10:26:44 2003 @@ -99,6 +99,7 @@ tm.tm_isdst = -1; lm->date = ol_string_alloc(16); strftime(lm->date->data, 16, "%b %e %H:%M:%S", &tm); + lm->date->length--; src[20] = ':'; src += 21; left -= 21; -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
participants (1)
-
Balazs Scheidler