RFC: dinput8/tests: Add valid wide string termination to actionName member.
Huw Davies
huw at codeweavers.com
Thu Aug 4 02:31:18 CDT 2016
On Tue, Aug 02, 2016 at 11:34:10PM +0200, Bernhard Übelacker wrote:
> https://bugs.winehq.org/show_bug.cgi?id=40384
> https://www.winehq.org/pipermail/wine-devel/2016-July/114054.html
>
> DirectX SDK offers the possibility to increase debug
> output via "DirectX Control Panel".
> This prints this error:
> DINPUT8: ERROR IDirectInput8::EnumDevicesBySemantics: arg 2: invalid UNICODE string
>
> It looks like ansi version of EnumDevicesBySemantics forwards the string to
> the wide variant without conversation.
> So the assumption is that with the old compiler version we got
> enough valid wide string termination between the ansi string actionName
> member and the next invalid memory page.
> This is the added test trying to prove by putting the string right before
> a memory page with PAGE_NOACCESS.
This seems pretty convincing, thanks for tracking this down.
We don't actually want to test for this Windows bug, so please
resend the patch without the PAGE_NOACCESS stuff - just add
a comment explaining the double nul-termination.
Huw.
More information about the wine-devel
mailing list