[Bug 49344] Implement kernelbase.GetModuleFileNameW using ntdll.LdrGetDllFullName

WineHQ Bugzilla wine-bugs at winehq.org
Sun Oct 3 10:09:31 CDT 2021


https://bugs.winehq.org/show_bug.cgi?id=49344

--- Comment #3 from Nikolay Sivov <bunglehead at gmail.com> ---
(In reply to Arne de Bruijn from comment #2)
> 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);

Please file a bug report for that, we could probably min() it in ints, to avoid
this 16bit overflow.

-- 
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