From f7b3909103a0acd5ee0426b85112f2c9ed4e7730 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 6 May 2011 07:54:18 -0700 Subject: A couple more off-by-one calculations with strlcpy. Autobuild-User: Jeremy Allison Autobuild-Date: Fri May 6 18:39:17 CEST 2011 on sn-devel-104 --- source3/groupdb/mapping_tdb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/groupdb/mapping_tdb.c b/source3/groupdb/mapping_tdb.c index 60cdbf1447..a5fa1b7a24 100644 --- a/source3/groupdb/mapping_tdb.c +++ b/source3/groupdb/mapping_tdb.c @@ -901,10 +901,10 @@ static int convert_ldb_record(TDB_CONTEXT *ltdb, TDB_DATA key, } } else if (StrCaseCmp(name, "ntname") == 0) { strlcpy(map.nt_name, val, - sizeof(map.nt_name) -1); + sizeof(map.nt_name)); } else if (StrCaseCmp(name, "comment") == 0) { strlcpy(map.comment, val, - sizeof(map.comment) -1); + sizeof(map.comment)); } else if (StrCaseCmp(name, "member") == 0) { if (!string_to_sid(&members[j], val)) { errno = EIO; -- cgit