[Bug 37759] GetStringTypeW: Access violation when src param is null
wine-bugs at winehq.org
wine-bugs at winehq.org
Mon Dec 22 21:18:20 CST 2014
https://bugs.winehq.org/show_bug.cgi?id=37759
--- Comment #4 from Sebastian Lackner <sebastian at fds-team.de> ---
The new code added in your patch mixes spaces and tabs, which should probably
be fixed before the submission to wine-patches at winehq.org. If possible also
look at the corresponding test suite. There are already existing tests for this
functio, and your special case could be easily added.
See dlls/kernel32/tests/locale.c, function test_GetStringTypeW.
Something like:
BOOL res;
/* test with src = NULL and count = 0 */
SetLastError(0xdeadbeef);
memset(types,0,sizeof(types));
res = GetStringTypeW(CP_CTYPE1, NULL, 0, types);
ok(!res, "GetStringTypeW unexpectedly succeeded\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER, "wrong error, got %u\n",
GetLastError());
/* test with src = NULL and count != 0 */
SetLastError(0xdeadbeef);
memset(types,0,sizeof(types));
res = GetStringTypeW(CP_CTYPE1, NULL, 10, types);
ok(!res, "GetStringTypeW unexpectedly succeeded\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER, "wrong error, got %u\n",
GetLastError());
Thanks for your effort :)
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list