https://bugs.winehq.org/show_bug.cgi?id=49344
Arne de Bruijn wine@2ar.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wine@2ar.nl
--- Comment #2 from Arne de Bruijn wine@2ar.nl --- This change broke passing large buffers (>=32768 characters) to GetModuleFileNameW, as done by cygwin.
Possible fix:
name.MaximumLength = (size < 0xffff / sizeof(WCHAR) ? size : 0xffff / sizeof(WCHAR)) * sizeof(WCHAR);