From d3a99579f6c87bf9bc5863ca645bc1456ee6834f Mon Sep 17 00:00:00 2001 From: Brendan Powers Date: Tue, 25 May 2010 16:14:37 -0400 Subject: libcli: Fixed a segfault in security_acl_dup when the acl is NULL. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This can happen when duplicating a security descriptor that is missing either sacls or dacls. Signed-off-by: Matthias Dieter Wallnöfer --- libcli/security/security_descriptor.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libcli') 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; -- cgit