http://bugs.winehq.org/show_bug.cgi?id=58293
Bug ID: 58293 Summary: Regression caused by switch to realloc which doesn't zero added memory Product: Wine Version: 10.7 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: wintrust Assignee: wine-bugs@winehq.org Reporter: twhitehead@gmail.com Distribution: ---
Created attachment 78644 --> http://bugs.winehq.org/attachment.cgi?id=78644 Log showing run with and without reverting 6db69d0 under wine 10.7
In wine 8 `LibOVR.dll` (the shim) would load `LibOVRRT32_1.dll` (the Oculus API). In wine 9 and later this is no longer the case. Reverting 6db69d0 (wintrust: Use CRT allocation function) makes it work again.
Looking over this commit I expect the issue is the switch from ``` static void* WINTRUST_ReAlloc(void *ptr, DWORD cb) __WINE_ALLOC_SIZE(2); static void* WINTRUST_ReAlloc(void *ptr, DWORD cb) { return HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, ptr, cb); } ``` which zeros added memory to realloc which does not. Presumably this is resulting in some field being populated with garbage, and that makes `LibOVR.dll` unhappy when it verifies the signatures on `LibOVRRT32_1.dll`.
I put more details and a test program in the following github repo
https://github.com/twhitehead/issue-wine-ovrf