[Bug 57027] New: GetFinalPathNameByHandleW does not handle paths exceeding MAX_PATH (260 chars)
https://bugs.winehq.org/show_bug.cgi?id=57027 Bug ID: 57027 Summary: GetFinalPathNameByHandleW does not handle paths exceeding MAX_PATH (260 chars) Product: Wine Version: 9.0 Hardware: aarch64 OS: MacOS Status: UNCONFIRMED Severity: normal Priority: P2 Component: kernel32 Assignee: wine-bugs(a)winehq.org Reporter: wine(a)purisa.me Hello, I am writing a Rust program that calls canonicalize() on a path that is over 260 characters long. The Windows implementation of this function calls GetFinalPathNameByHandleW. On Windows, this works just fine and returns a valid path. With Wine on macOS, the call returns a win32 error code ERROR_MORE_DATA (234, 0xEA). I re-ran the binary with WINEDEBUG=+relay and there is an NtStatus code STATUS_BUFFER_OVERFLOW (0x80000005) coming from NtQueryObject. I believe this is because the buffer allocated in Wine's implementation of GetFinalPathNameByHandleW is not large enough for the ObjectInformation NtQueryObject is trying to return. Should GetFinalPathNameByHandleW fall back to a dynamically allocated buffer in this situation? Thank you! -- 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.
https://bugs.winehq.org/show_bug.cgi?id=57027 --- Comment #1 from Sameer Puri <wine(a)purisa.me> --- Created attachment 76877 --> https://bugs.winehq.org/attachment.cgi?id=76877 Relevant calls made when run with WINEDEBUG=+relay -- 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.
https://bugs.winehq.org/show_bug.cgi?id=57027 Fabian Maurer <dark.shadow4(a)web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4(a)web.de -- 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.
http://bugs.winehq.org/show_bug.cgi?id=57027 Bernhard Übelacker <bernhardu(a)mailbox.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bernhardu(a)mailbox.org --- Comment #2 from Bernhard Übelacker <bernhardu(a)mailbox.org> --- Submitted merge request: https://gitlab.winehq.org/wine/wine/-/merge_requests/8240 -- 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.
http://bugs.winehq.org/show_bug.cgi?id=57027 Bernhard Übelacker <bernhardu(a)mailbox.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED Fixed by SHA1| |e76a49ae4e056123eaf42febac9 | |8f3be298e51fb --- Comment #3 from Bernhard Übelacker <bernhardu(a)mailbox.org> --- The merge request got accepted, so this bug should no longer appear with current git or the next release wine-10.14. Resolving fixed. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=57027 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #4 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 10.14. -- 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.
participants (1)
-
WineHQ Bugzilla