Author: tkreuzer
Date: Thu May 1 08:55:04 2014
New Revision: 63088
URL:
http://svn.reactos.org/svn/reactos?rev=63088&view=rev
Log:
[WIN32K]
Check return value of NtQuerySystemInformation in EngQuerySystemAttribute
CID 513027
Modified:
trunk/reactos/win32ss/gdi/eng/engmisc.c
Modified: trunk/reactos/win32ss/gdi/eng/engmisc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/engmisc.c?…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/engmisc.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/engmisc.c [iso-8859-1] Thu May 1 08:55:04 2014
@@ -245,22 +245,34 @@
{
SYSTEM_BASIC_INFORMATION sbi;
SYSTEM_PROCESSOR_INFORMATION spi;
+ NTSTATUS status;
switch (CapNum)
{
case EngNumberOfProcessors:
- NtQuerySystemInformation(SystemBasicInformation,
- &sbi,
- sizeof(SYSTEM_BASIC_INFORMATION),
- NULL);
+ status = NtQuerySystemInformation(SystemBasicInformation,
+ &sbi,
+ sizeof(SYSTEM_BASIC_INFORMATION),
+ NULL);
+ if (!NT_SUCCESS(status))
+ {
+ DPRINT1("Failed to query basic information: 0x%ls\n", status);
+ return FALSE;
+ }
+
*pCapability = sbi.NumberOfProcessors;
return TRUE;
case EngProcessorFeature:
- NtQuerySystemInformation(SystemProcessorInformation,
- &spi,
- sizeof(SYSTEM_PROCESSOR_INFORMATION),
- NULL);
+ status = NtQuerySystemInformation(SystemProcessorInformation,
+ &spi,
+ sizeof(SYSTEM_PROCESSOR_INFORMATION),
+ NULL);
+ if (!NT_SUCCESS(status))
+ {
+ DPRINT1("Failed to query processor information: 0x%ls\n",
status);
+ return FALSE;
+ }
*pCapability = spi.ProcessorFeatureBits;
return TRUE;