https://git.reactos.org/?p=reactos.git;a=commitdiff;h=97d0595bf6810713b4a74…
commit 97d0595bf6810713b4a74b2337e98d63496f2d81
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Fri Dec 28 19:25:43 2018 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Thu Jan 3 22:52:06 2019 +0100
[LDR] Don't dereference a possible nullptr
---
dll/ntdll/ldr/ldrinit.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dll/ntdll/ldr/ldrinit.c b/dll/ntdll/ldr/ldrinit.c
index bc72c952cd..d28cb6e8a1 100644
--- a/dll/ntdll/ldr/ldrinit.c
+++ b/dll/ntdll/ldr/ldrinit.c
@@ -2135,8 +2135,10 @@ LdrpInitializeProcess(IN PCONTEXT Context,
if (FreeCurDir) RtlFreeUnicodeString(&CurrentDirectory);
}
- /* Check if we should look for a .local file */
- if (ProcessParameters->Flags & RTL_USER_PROCESS_PARAMETERS_LOCAL_DLL_PATH)
+ /* Check if we should look for a .local file
+ FIXME: Thomas suggested that this check might actually be reversed, we should
check this file
+ if the flag is NOT set. */
+ if (ProcessParameters && (ProcessParameters->Flags &
RTL_USER_PROCESS_PARAMETERS_LOCAL_DLL_PATH))
{
/* FIXME */
DPRINT1("We don't support .local overrides yet\n");