Re: [1/2] advapi32: Added check for NULL pointer being passed to QueryServiceStatus for either parameter. SetLastError is set according to tests in tests/service.c and in accordance with platform.
20 Dec
2010
20 Dec
'10
5:53 p.m.
On 12/20/2010 11:29 AM, Damian Dixon wrote:
+ if (!lpservicestatus) + { + OSVERSIONINFOW osVi; + /* Get windows version emulating */ + osVi.dwOSVersionInfoSize = sizeof(osVi); + GetVersionExW(&osVi); + if (osVi.dwPlatformId == VER_PLATFORM_WIN32_NT) + { + if (osVi.dwMajorVersion > 4) + { + SetLastError(ERROR_INVALID_ADDRESS); + } + else + { + SetLastError(ERROR_INVALID_PARAMETER); + } + } + return FALSE; + } +
You shouldn't need to check the Windows version. Setting the last error to a reasonable value for a particular platform is sufficient.
5561
Age (days ago)
5561
Last active (days ago)
0 comments
1 participants
participants (1)
-
Andrew Nguyen