From 2a73a4985eb4a7fcd5dc31aee66dfcd0d305d94b Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 10 Nov 2013 11:57:37 +0100 Subject: smbd: Fix CID 1035366 Buffer not null terminated Signed-off-by: Volker Lendecke Reviewed-by: Ira Cooper --- source3/lib/conn_tdb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/conn_tdb.c b/source3/lib/conn_tdb.c index 8c21b6f509..2169756c79 100644 --- a/source3/lib/conn_tdb.c +++ b/source3/lib/conn_tdb.c @@ -116,12 +116,12 @@ static int traverse_tcon_fn(struct smbXsrv_tcon_global0 *global, key.pid = data.pid = global->server_id; key.cnum = data.cnum = global->tcon_global_id; - strncpy(key.name, global->share_name, sizeof(key.name)); - strncpy(data.servicename, global->share_name, sizeof(data.servicename)); + fstrcpy(key.name, global->share_name); + fstrcpy(data.servicename, global->share_name); data.uid = sess.uid; data.gid = sess.gid; - strncpy(data.addr, sess.addr, sizeof(data.addr)); - strncpy(data.machine, sess.machine, sizeof(data.machine)); + fstrcpy(data.addr, sess.addr); + fstrcpy(data.machine, sess.machine); data.start = nt_time_to_unix(global->creation_time); state->count++; -- cgit