[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Wed Apr 29 00:21:03 MDT 2015

The branch, master has been updated
       via  688aae8 s4: Fix bad review I did in dom_sid_parse_length() code.
      from  3f35c1d tdb: version 1.3.5


- Log -----------------------------------------------------------------
commit 688aae8bac975e5f0025e2e56dbde3a93634f59b
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Apr 28 17:20:42 2015 -0700

    s4: Fix bad review I did in dom_sid_parse_length() code.
    Volker, apologies for the mistake.
    Spotted by Andrew Bartlett <abartlet at samba.org>
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Wed Apr 29 08:20:23 CEST 2015 on sn-devel-104


Summary of changes:
 libcli/security/dom_sid.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Changeset truncated at 500 lines:

diff --git a/libcli/security/dom_sid.c b/libcli/security/dom_sid.c
index 2910434..8b30ee6 100644
--- a/libcli/security/dom_sid.c
+++ b/libcli/security/dom_sid.c
@@ -244,7 +244,8 @@ struct dom_sid *dom_sid_parse_talloc(TALLOC_CTX *mem_ctx, const char *sidstr)
 struct dom_sid *dom_sid_parse_length(TALLOC_CTX *mem_ctx, const DATA_BLOB *sid)
 	char p[sid->length+1];
-	memcpy(p, sid->data, sizeof(p));
+	memcpy(p, sid->data, sid->length);
+	p[sid->length] = '\0';
 	return dom_sid_parse_talloc(mem_ctx, p);

Samba Shared Repository

More information about the samba-cvs mailing list