diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2003-04-08 17:57:34 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2003-04-08 17:57:34 +0000 |
commit | 63c5dd8640838327d93ad0ecdbbd33b8bb9e8de8 (patch) | |
tree | 312921db3dd2b021b4577feac5711067a414f9e5 /usr.sbin | |
parent | a793753e9668e71bee95f852f6cae874558846d1 (diff) |
string stuff, ok pval
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/httpd/src/support/rotatelogs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/httpd/src/support/rotatelogs.c b/usr.sbin/httpd/src/support/rotatelogs.c index 944d14d7a5e..630cadde8e3 100644 --- a/usr.sbin/httpd/src/support/rotatelogs.c +++ b/usr.sbin/httpd/src/support/rotatelogs.c @@ -88,7 +88,7 @@ int main (int argc, char **argv) strftime(buf2, sizeof(buf2), szLogRoot, tm_now); } else { - sprintf(buf2, "%s.%010d", szLogRoot, (int) tLogStart); + snprintf(buf2, sizeof(buf2), "%s.%010d", szLogRoot, (int) tLogStart); } tLogEnd = tLogStart + tRotation; nLogFD = open(buf2, O_WRONLY | O_CREAT | O_APPEND, 0666); @@ -102,7 +102,7 @@ int main (int argc, char **argv) } else { nLogFD = nLogFDprev; - sprintf(errbuf, + snprintf(errbuf, sizeof(errbuf), "Resetting log file due to error opening " "new log file. %10d messages lost.\n", nMessCount); @@ -125,7 +125,7 @@ int main (int argc, char **argv) } while (nWrite < 0 && errno == EINTR); if (nWrite != nRead) { nMessCount++; - sprintf(errbuf, + snprintf(errbuf, sizeof(errbuf), "Error writing to log file. " "%10d messages lost.\n", nMessCount); |