From b754e4af39d8a720a45dbc6b472211b4ca2eefcc Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 4 Dec 2003 04:31:29 +0000 Subject: don't crash on a NULL priviledge pointer; patch from Jianliang Lu (This used to be commit 2742e813fea2366f91bec62dca407f65ad5c4623) --- source3/lib/privileges.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3/lib') diff --git a/source3/lib/privileges.c b/source3/lib/privileges.c index 1ed583382d..b9d4df301d 100644 --- a/source3/lib/privileges.c +++ b/source3/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"); -- cgit