summaryrefslogtreecommitdiff
path: root/source3/smbd/connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/connection.c')
-rw-r--r--source3/smbd/connection.c2
1 files changed, 1 insertions, 1 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));