The application again the bug, passed 1 as the elem parameter which
doubled the memory being allocated. When it overflowed (became negative),
the value was passed into GlobalAlloc16 which then failed.
GlobalAlloc16 takes a DWORD parameter, so the value isn't going to be truncated.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53092
Original patch by github user cracyc for winevdm.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2947
To be merged after !2907.
--
v2: wineoss: Use mmdevapi's AudioClient's GetService.
winecoreaudio: Use mmdevapi's AudioClient's GetService.
winealsa: Use mmdevapi's AudioClient's GetService.
winepulse: Move AudioClient's GetService into mmdevapi.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2908