diff options
author | Jeremy Allison <jra@samba.org> | 2001-04-08 20:22:39 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-04-08 20:22:39 +0000 |
commit | f9a15ce1a69f905e94db7650f0a4805720cd9c88 (patch) | |
tree | ee37b735477fe7eaea7cb16a30d126971aae8d5b /source3/smbd | |
parent | 607d5d508d091d6c9b9cd6549b2a89f7359d780c (diff) | |
download | samba-f9a15ce1a69f905e94db7650f0a4805720cd9c88.tar.gz samba-f9a15ce1a69f905e94db7650f0a4805720cd9c88.tar.bz2 samba-f9a15ce1a69f905e94db7650f0a4805720cd9c88.zip |
Got "medieval on our ass" about adding the -1 to slprintf.
Jeremy.
(This used to be commit 94747b4639ed9b19f7d0fb896e43aa392a84989a)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/connection.c | 2 | ||||
-rw-r--r-- | source3/smbd/dfree.c | 2 | ||||
-rw-r--r-- | source3/smbd/process.c | 2 | ||||
-rw-r--r-- | source3/smbd/reply.c | 2 | ||||
-rw-r--r-- | source3/smbd/server.c | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/source3/smbd/connection.c b/source3/smbd/connection.c index 8ab4e0c5d3..125b2fbbe5 100644 --- a/source3/smbd/connection.c +++ b/source3/smbd/connection.c @@ -434,7 +434,7 @@ static int utmp_fill(struct utmp *u, const connection_struct *conn, pid_t pid, * o with overflow if ut_line would be more than full. */ memset(line_tmp, '\0', sizeof(line_tmp)); - slprintf(line_tmp, sizeof(line_tmp), (char *) ut_line_template, i); + slprintf(line_tmp, sizeof(line_tmp)-1, (char *) ut_line_template, i); line_len = strlen(line_tmp); if (line_len <= sizeof(u->ut_line)) { memcpy(u->ut_line, line_tmp, sizeof(u->ut_line)); diff --git a/source3/smbd/dfree.c b/source3/smbd/dfree.c index c523f2cab4..64c6182cd8 100644 --- a/source3/smbd/dfree.c +++ b/source3/smbd/dfree.c @@ -88,7 +88,7 @@ static SMB_BIG_UINT disk_free(char *path, BOOL small_query, char **lines; pstring syscmd; - slprintf(syscmd, sizeof(syscmd), "%s %s", dfree_command, path); + slprintf(syscmd, sizeof(syscmd)-1, "%s %s", dfree_command, path); DEBUG (3, ("disk_free: Running command %s\n", syscmd)); lines = file_lines_pload(syscmd, NULL, True); diff --git a/source3/smbd/process.c b/source3/smbd/process.c index dea7130cfe..ac5454c48c 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -592,7 +592,7 @@ static void smb_dump(char *name, int type, char *data, ssize_t len) if (len < 4) len = smb_len(data)+4; for (i=1;i<100;i++) { - slprintf(fname,sizeof(fname), "/tmp/%s.%d.%s", name, i, + slprintf(fname,sizeof(fname)-1, "/tmp/%s.%d.%s", name, i, type ? "req" : "resp"); fd = open(fname, O_WRONLY|O_CREAT|O_EXCL, 0644); if (fd != -1 || errno != EEXIST) break; diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 35a4b0f54a..4176dd0104 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -880,7 +880,7 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int if (!sys_getpwnam(user)) { pstring user2; - slprintf(user2,sizeof(user2),"%s%s%s", dos_to_unix(domain,False), + slprintf(user2,sizeof(user2)-1,"%s%s%s", dos_to_unix(domain,False), lp_winbind_separator(), user); if (sys_getpwnam(user2)) { diff --git a/source3/smbd/server.c b/source3/smbd/server.c index baa1536248..adf57b3f55 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -626,7 +626,7 @@ static void usage(char *pname) TimeInit(); if(!specified_logfile) { - slprintf(debugf, sizeof(debugf), "%s/log.smbd", LOGFILEBASE); + slprintf(debugf, sizeof(debugf)-1, "%s/log.smbd", LOGFILEBASE); } pstrcpy(remote_machine, "smbd"); |