diff options
Diffstat (limited to 'source3/lib/pidfile.c')
-rw-r--r-- | source3/lib/pidfile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/pidfile.c b/source3/lib/pidfile.c index 46d6a9d5b8..9cb3f5afef 100644 --- a/source3/lib/pidfile.c +++ b/source3/lib/pidfile.c @@ -58,7 +58,7 @@ void pidfile_create(char *name) } memset(buf, 0, sizeof(buf)); - sprintf(buf, "%u\n", (unsigned int) getpid()); + slprintf(buf, sizeof(buf) - 1, "%u\n", (unsigned int) getpid()); if (write(fd, buf, sizeof(buf)) != sizeof(buf)) { DEBUG(0,("ERROR: can't write to %s: %s\n", pidFile, strerror(errno))); |