From 2901fe89216e941e7bc2fd7eb81c9d40349c17ab Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 22 Mar 2017 15:41:47 +0100 Subject: [PATCH] net: Don't crash if lsa_LookupPrivDisplayName returns NULL lsa_LookupPrivDisplayName on Windows 2012R2 can return success and still return a NULL name: rpc_api_pipe: got frag len of 36 at offset 0: NT_STATUS_OK rpc_api_pipe: host 172.18.103.80 returned 12 bytes. lsa_LookupPrivDisplayName: struct lsa_LookupPrivDisplayName out: struct lsa_LookupPrivDisplayName disp_name : * disp_name : NULL returned_language_id : * returned_language_id : 0x0000 (0) result : NT_STATUS_OK Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Thu Mar 23 07:43:57 CET 2017 on sn-devel-144 --- source3/utils/net_rpc_rights.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/utils/net_rpc_rights.c b/source3/utils/net_rpc_rights.c index 9640db0fe60..c37b04ebb9a 100644 --- a/source3/utils/net_rpc_rights.c +++ b/source3/utils/net_rpc_rights.c @@ -153,7 +153,7 @@ static NTSTATUS enum_privileges(struct rpc_pipe_client *pipe_hnd, continue; } - d_printf("%s\n", description->string); + d_printf("%s\n", description ? description->string : "??????"); } return NT_STATUS_OK;