From f9a15ce1a69f905e94db7650f0a4805720cd9c88 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sun, 8 Apr 2001 20:22:39 +0000 Subject: Got "medieval on our ass" about adding the -1 to slprintf. Jeremy. (This used to be commit 94747b4639ed9b19f7d0fb896e43aa392a84989a) --- source3/nsswitch/winbindd_idmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/nsswitch/winbindd_idmap.c') 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; -- cgit