diff options
author | Jeremy Allison <jra@samba.org> | 2015-04-28 17:20:42 -0700 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2015-04-29 08:20:23 +0200 |
commit | 688aae8bac975e5f0025e2e56dbde3a93634f59b (patch) | |
tree | 89fb13a813ac539f8ed4a7ff9030f6cf6a525757 /libcli/security | |
parent | 3f35c1d52ee77f7cabd52dd503565cec360f1de2 (diff) | |
download | samba-688aae8bac975e5f0025e2e56dbde3a93634f59b.tar.gz |
s4: Fix bad review I did in dom_sid_parse_length() code.
Volker, apologies for the mistake.
Spotted by Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Apr 29 08:20:23 CEST 2015 on sn-devel-104
Diffstat (limited to 'libcli/security')
-rw-r--r-- | libcli/security/dom_sid.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libcli/security/dom_sid.c b/libcli/security/dom_sid.c index 291043446b0..8b30ee67eea 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); } |