summaryrefslogtreecommitdiffstats
path: root/source/rpc_parse/parse_sec.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2007-05-14 14:24:52 +0000
committerGerald Carter <jerry@samba.org>2007-05-14 14:24:52 +0000
commitc3f0e56c057f6be60bd3721485f013ed63defa6a (patch)
tree912f4dfedfc0303371a02b2ec9f77e1328c0b0ee /source/rpc_parse/parse_sec.c
parente6549096bedeac730cacbcaffddd6f907e4c9e28 (diff)
downloadsamba-3.0.25.tar.gz
samba-3.0.25.tar.xz
samba-3.0.25.zip
r22853: checkin pending security fixes and release notes updates for Samba 3.0.25samba-3.0.25
Diffstat (limited to 'source/rpc_parse/parse_sec.c')
-rw-r--r--source/rpc_parse/parse_sec.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/source/rpc_parse/parse_sec.c b/source/rpc_parse/parse_sec.c
index 76583605939..15c6d7f1657 100644
--- a/source/rpc_parse/parse_sec.c
+++ b/source/rpc_parse/parse_sec.c
@@ -147,13 +147,12 @@ BOOL sec_io_acl(const char *desc, SEC_ACL **ppsa, prs_struct *ps, int depth)
return False;
if (UNMARSHALLING(ps)) {
- /*
- * Even if the num_aces is zero, allocate memory as there's a difference
- * between a non-present DACL (allow all access) and a DACL with no ACE's
- * (allow no access).
- */
- if((psa->aces = PRS_ALLOC_MEM(ps, SEC_ACE, psa->num_aces+1)) == NULL)
- return False;
+ if (psa->num_aces) {
+ if((psa->aces = PRS_ALLOC_MEM(ps, SEC_ACE, psa->num_aces)) == NULL)
+ return False;
+ } else {
+ psa->aces = NULL;
+ }
}
for (i = 0; i < psa->num_aces; i++) {