diff options
author | Gerald Carter <jerry@samba.org> | 2003-12-04 04:32:22 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-12-04 04:32:22 +0000 |
commit | 5bbfa9989bcade2e1192a68596de3e574faed1d5 (patch) | |
tree | 3e4df43784988f3b83a35707e7067f09b49b9790 | |
parent | c0f34b42a6a4af09ae4b76721bc350784d87f686 (diff) | |
download | samba-5bbfa9989bcade2e1192a68596de3e574faed1d5.tar.gz |
don't crash on a NULL priviledge pointer; patch from Jianliang Lu
-rw-r--r-- | source/lib/privileges.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/lib/privileges.c b/source/lib/privileges.c index 1ed583382de..b9d4df301d9 100644 --- a/source/lib/privileges.c +++ b/source/lib/privileges.c @@ -69,6 +69,12 @@ NTSTATUS dupalloc_luid_attr(TALLOC_CTX *mem_ctx, LUID_ATTR **new_la, LUID_ATTR * { NTSTATUS ret; + /* don't crash if the source pointer is NULL (since we don't + do priviledges now anyways) */ + + if ( !old_la ) + return NT_STATUS_OK; + *new_la = (LUID_ATTR *)talloc(mem_ctx, sizeof(LUID_ATTR)); ALLOC_CHECK(new_la, ret, done, "dupalloc_luid_attr"); |