[ros-bugs] [Bug 5619] New: PsaCaptureSystemModules() noncritical incorrectness

ReactOS.Bugzilla at reactos.org ReactOS.Bugzilla at reactos.org
Sat Sep 18 11:47:35 UTC 2010


           Summary: PsaCaptureSystemModules() noncritical incorrectness
           Product: ReactOS
           Version: TRUNK
          Platform: x86 Hardware
        OS/Version: ReactOS
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: Win32
        AssignedTo: ros-bugs at reactos.org
        ReportedBy: dragity at mail.com

Corrected function :
lib/epsapi/enum/drivers.c   PsaCaptureSystemModules()

Requested from :

Current source :

The code in real isn't nonworking, but the first request to
'NtQuerySystemInformation(SystemModuleInformation)' is incorrect, and 'nSize'
value remains 0.

  Status = NtQuerySystemInformation(SystemModuleInformation,
        Status = NtQuerySystemInformation (SystemModuleInformation, 0, 0,

  /* RATIONALE: the loading of a system module is a rare occurrence. To
     minimize memory operations that could be expensive, or fragment the
     pool/heap, we try to determine the buffer size in advance, knowing that
     the number of elements is unlikely to change */
  nSize = sizeof(RTL_PROCESS_MODULES) +
          (nSize * sizeof(RTL_PROCESS_MODULES));
// Alex_I :  the number of modules can change; we aren't in kernel mode, and
cannot lock this resource; from here we only may just do a loop of retries

    /* double the buffer for the next loop */
    nSize *= 2;
// Alex_I :  increase on some value to make a retry
    nSize += sizeof(RTL_PROCESS_MODULES) * 16;

*nicks can be removed from the comments

Configure bugmail: http://www.reactos.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the Ros-bugs mailing list