summaryrefslogtreecommitdiff
path: root/source3/lsarpcd
diff options
context:
space:
mode:
authorMatthew Chapman <matty@samba.org>1999-02-15 05:33:30 +0000
committerMatthew Chapman <matty@samba.org>1999-02-15 05:33:30 +0000
commit2737f26ad64ee32d6ef7365dcce0a3eb881f99db (patch)
tree52dce623844dbea155cb961ad50f1edf83d8a1df /source3/lsarpcd
parent0baa42bdd751b81ca6d17d1b5377a4e345936cad (diff)
downloadsamba-2737f26ad64ee32d6ef7365dcce0a3eb881f99db.tar.gz
samba-2737f26ad64ee32d6ef7365dcce0a3eb881f99db.tar.bz2
samba-2737f26ad64ee32d6ef7365dcce0a3eb881f99db.zip
Always null-terminate strings.
Also some string length and sizeof(pointer) corrections. (This used to be commit ce24191939b82985d09eabe945199f38b0fea486)
Diffstat (limited to 'source3/lsarpcd')
-rw-r--r--source3/lsarpcd/srv_lsa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/lsarpcd/srv_lsa.c b/source3/lsarpcd/srv_lsa.c
index fbbeb4233e..45ddefe592 100644
--- a/source3/lsarpcd/srv_lsa.c
+++ b/source3/lsarpcd/srv_lsa.c
@@ -156,7 +156,7 @@ static int make_dom_ref(DOM_R_REF *ref, char *dom_name, DOM_SID *dom_sid)
for (num = 0; num < ref->num_ref_doms_1; num++)
{
fstring domname;
- unistr2_to_ascii(domname, &ref->ref_dom[num].uni_dom_name, sizeof(domname));
+ unistr2_to_ascii(domname, &ref->ref_dom[num].uni_dom_name, sizeof(domname)-1);
if (strequal(domname, dom_name))
{
return num;
@@ -217,7 +217,7 @@ static void make_lsa_rid2s(DOM_R_REF *ref,
char *dom_name = NULL;
uint8 sid_name_use = SID_NAME_UNKNOWN;
- unistr2_to_ascii(find_name, &name[i], sizeof(find_name));
+ unistr2_to_ascii(find_name, &name[i], sizeof(find_name)-1);
dom_name = strdup(find_name);
if (map_domain_name_to_sid(&sid, &dom_name))