summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_idmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/nsswitch/winbindd_idmap.c')
-rw-r--r--source3/nsswitch/winbindd_idmap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/nsswitch/winbindd_idmap.c b/source3/nsswitch/winbindd_idmap.c
index ff0818c456..11f7b8aae7 100644
--- a/source3/nsswitch/winbindd_idmap.c
+++ b/source3/nsswitch/winbindd_idmap.c
@@ -77,7 +77,7 @@ static BOOL get_id_from_rid(char *domain_name, uint32 rid, int *id,
/* Check if rid is present in database */
- slprintf(keystr, sizeof(keystr), "%s/%d", domain_name, rid);
+ slprintf(keystr, sizeof(keystr)-1, "%s/%d", domain_name, rid);
dos_to_unix(keystr, True); /* Convert key to unix-codepage */
key.dptr = keystr;
@@ -116,7 +116,7 @@ static BOOL get_id_from_rid(char *domain_name, uint32 rid, int *id,
/* Store new id */
- slprintf(keystr2, sizeof(keystr2), "%s %d", isgroup ? "GID" :
+ slprintf(keystr2, sizeof(keystr2)-1, "%s %d", isgroup ? "GID" :
"UID", *id);
data.dptr = keystr2;
@@ -155,7 +155,7 @@ BOOL get_rid_from_id(int id, uint32 *rid, struct winbindd_domain **domain,
fstring keystr;
BOOL result = False;
- slprintf(keystr, sizeof(keystr), "%s %d", isgroup ? "GID" : "UID", id);
+ slprintf(keystr, sizeof(keystr)-1, "%s %d", isgroup ? "GID" : "UID", id);
key.dptr = keystr;
key.dsize = strlen(keystr) + 1;