diff options
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r-- | source3/rpc_parse/parse_sec.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/rpc_parse/parse_sec.c b/source3/rpc_parse/parse_sec.c index 2aba894834..51cf52f706 100644 --- a/source3/rpc_parse/parse_sec.c +++ b/source3/rpc_parse/parse_sec.c @@ -256,7 +256,11 @@ BOOL sec_io_acl(char *desc, SEC_ACL **ppsa, prs_struct *ps, int depth) size_t sec_desc_size(SEC_DESC *psd) { - size_t offset = SD_HEADER_SIZE; + size_t offset; + + if (!psd) return 0; + + offset = SD_HEADER_SIZE; if (psd->owner_sid != NULL) offset += ((sid_size(psd->owner_sid) + 3) & ~3); @@ -411,7 +415,6 @@ SEC_DESC *make_standard_sec_desc(DOM_SID *owner_sid, DOM_SID *grp_sid, owner_sid, grp_sid, NULL, dacl, sd_size); } - /******************************************************************* Reads or writes a SEC_DESC structure. If reading and the *ppsd = NULL, allocates the structure. |