diff options
author | Brendan Powers <brendan0powers@gmail.com> | 2010-05-25 16:14:37 -0400 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-06-19 22:20:48 +0200 |
commit | d3a99579f6c87bf9bc5863ca645bc1456ee6834f (patch) | |
tree | 5bfe72bac643f1d8067fc8618f072e5768142401 /libcli/security | |
parent | cadca1f6ba514eb7b022d761935f80b3049cede4 (diff) | |
download | samba-d3a99579f6c87bf9bc5863ca645bc1456ee6834f.tar.gz samba-d3a99579f6c87bf9bc5863ca645bc1456ee6834f.tar.bz2 samba-d3a99579f6c87bf9bc5863ca645bc1456ee6834f.zip |
libcli: Fixed a segfault in security_acl_dup when the acl is NULL.
This can happen when duplicating a security descriptor that is missing either sacls or dacls.
Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
Diffstat (limited to 'libcli/security')
-rw-r--r-- | libcli/security/security_descriptor.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libcli/security/security_descriptor.c b/libcli/security/security_descriptor.c index b77a281852..4e67e0a96b 100644 --- a/libcli/security/security_descriptor.c +++ b/libcli/security/security_descriptor.c @@ -55,6 +55,10 @@ struct security_acl *security_acl_dup(TALLOC_CTX *mem_ctx, { struct security_acl *nacl; + if (oacl == NULL) { + return NULL; + } + nacl = talloc (mem_ctx, struct security_acl); if (nacl == NULL) { return NULL; |