From 68a6182188e2cf83f9c0647abc5f2446bbe2408d Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 4 Jul 2007 12:07:22 +0200 Subject: [PATCH] ntdll: Add check for null pointer in NtQuerySystemInformation(SystemModuleInformation). --- dlls/ntdll/nt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c index ed707c0a71a..a303dcfd77e 100644 --- a/dlls/ntdll/nt.c +++ b/dlls/ntdll/nt.c @@ -845,7 +845,8 @@ NTSTATUS WINAPI NtQuerySystemInformation( break; case SystemModuleInformation: /* FIXME: should be system-wide */ - ret = LdrQueryProcessModuleInformation( SystemInformation, Length, &len ); + if (!SystemInformation) ret = STATUS_ACCESS_VIOLATION; + else ret = LdrQueryProcessModuleInformation( SystemInformation, Length, &len ); break; case SystemHandleInformation: {