checking for null and correct memmroy leak part of bug 252 patch by j_anderw
[reactos.git] / reactos / subsys / win32k / ntuser / monitor.c
index 212c3b7..cd1f86b 100644 (file)
@@ -630,6 +630,12 @@ NtUserGetMonitorInfo(
       RETURN(FALSE);
    }
 
+   if(pMonitorInfo == NULL)
+   {
+      SetLastNtError(STATUS_INVALID_PARAMETER);
+      RETURN(FALSE);
+   }
+
    /* get size of pMonitorInfo */
    Status = MmCopyFromCaller(&MonitorInfo.cbSize, &pMonitorInfo->cbSize, sizeof (MonitorInfo.cbSize));
    if (!NT_SUCCESS(Status))