kernel32: check the last parameter of K32EnumProcessModules for NULL before use (with test)

Nikolay Sivov bunglehead at gmail.com
Thu May 17 04:57:22 CDT 2012


On 5/17/2012 11:46, Stefan Leichter wrote:
>       SetLastError(0xdeadbeef);
> +    pEnumProcessModules(hpQI,&hMod, sizeof(HMODULE), NULL);
> +    ok(GetLastError() == ERROR_ACCESS_DENIED, "expected error=ERROR_ACCESS_DENIED but got %d\n", GetLastError());
> +
> +    SetLastError(0xdeadbeef);
> +    ret = pEnumProcessModules(hpQV,&hMod, sizeof(HMODULE), NULL);
> +    ok(!ret, "succeeded\n");
> +    ok(GetLastError() == ERROR_NOACCESS, "expected error=ERROR_NOACCESS but got %d\n", GetLastError());
> +
Why don't you check return value from the first call?



More information about the wine-devel mailing list