--- l2_ch_syslog.c 2001/10/06 14:33:09 1.22
+++ l2_ch_syslog.c 2001/10/06 14:35:57 1.23
@@ -283,13 +283,13 @@
if (caTime[4] == '0')
caTime[4] = ' ';
if (cfg->bLogPid)
- sprintf(caBuf, "<%d>%s %s %s[%lu]: %s",
- prio, caTime, cfg->szLocalHost,
- cfg->szIdent, (unsigned long)getpid(), buf);
+ n = l2_util_sprintf(caBuf, sizeof(caBuf), "<%d>%s %s %s[%lu]: %s",
+ prio, caTime, cfg->szLocalHost,
+ cfg->szIdent, (unsigned long)getpid(), buf);
else
- sprintf(caBuf, "<%d>%s %s %s: %s",
- prio, caTime, cfg->szLocalHost,
- cfg->szIdent, buf);
+ n = l2_util_sprintf(caBuf, sizeof(caBuf), "<%d>%s %s %s: %s",
+ prio, caTime, cfg->szLocalHost,
+ cfg->szIdent, buf);
if ((n = strlen(caBuf)) > 1024)
return L2_ERR_IO;
if ((rc = sa_send(cfg->saRemoteSock, caBuf, n,
|