[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.
Andrew Nguyen
anguyen at codeweavers.com
Mon Dec 20 11:53:08 CST 2010
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 899 bytes
Desc: OpenPGP digital signature
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20101220/e701c02b/attachment.pgp>
More information about the wine-devel
mailing list