https://bugs.winehq.org/show_bug.cgi?id=39867
Bug ID: 39867 Summary: Long path components (e.g. 250 character long) crash open/save dialogs Product: Wine Version: 1.8 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: comdlg32 Assignee: wine-bugs@winehq.org Reporter: whitequark@whitequark.org Distribution: ---
To reproduce: 1. mkdir aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 2. call GetOpenFileName and navigate to a directory containing the newly created one 3. Wine is aborted by stack smashing protection
https://bugs.winehq.org/show_bug.cgi?id=39867
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |00cpxxx@gmail.com
--- Comment #1 from Bruno Jesus 00cpxxx@gmail.com --- Please if possible attach some sample code to reproduce the issue.
https://bugs.winehq.org/show_bug.cgi?id=39867
--- Comment #2 from whitequark@whitequark.org --- Created attachment 53241 --> https://bugs.winehq.org/attachment.cgi?id=53241 build as: i686-w64-mingw32-gcc openfile.c -lcomdlg32
https://bugs.winehq.org/show_bug.cgi?id=39867
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, testcase
https://bugs.winehq.org/show_bug.cgi?id=39867
super_man@post.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |super_man@post.com
--- Comment #3 from super_man@post.com --- (In reply to whitequark from comment #2)
Created attachment 53241 [details] build as: i686-w64-mingw32-gcc openfile.c -lcomdlg32
I can confirm the issue wine 1.9.7
https://bugs.winehq.org/show_bug.cgi?id=39867
--- Comment #4 from Bruno Jesus 00cpxxx@gmail.com --- Created attachment 57197 --> https://bugs.winehq.org/attachment.cgi?id=57197 so-so patch
The attached patch works but the problem is very deep inside many shell32 and commdlg32 functions that rely on MAX_PATH and FILENAME_MAX constants.
https://bugs.winehq.org/show_bug.cgi?id=39867
winetest@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |winetest@luukku.com
--- Comment #5 from winetest@luukku.com --- There are 2-3 open bugs related to this. Could be just a bit difficult to find out of 6000 bugs.
https://bugs.winehq.org/show_bug.cgi?id=39867
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fgouget@codeweavers.com Keywords| |patch, source
https://bugs.winehq.org/show_bug.cgi?id=39867
Kyle_Katarn contact@kcsoftwares.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |contact@kcsoftwares.com
--- Comment #6 from Kyle_Katarn contact@kcsoftwares.com --- Same as : https://bugs.winehq.org/show_bug.cgi?id=48980 ?
https://bugs.winehq.org/show_bug.cgi?id=39867
KRosUser kyle.kcsoftwares@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle.kcsoftwares@gmail.com
--- Comment #7 from KRosUser kyle.kcsoftwares@gmail.com --- Bug still there in 8.0.2
https://bugs.winehq.org/show_bug.cgi?id=39867
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Severity|normal |minor CC| |dark.shadow4@web.de Status|UNCONFIRMED |NEW
--- Comment #8 from Fabian Maurer dark.shadow4@web.de --- In windows there's a lot of assumptions that paths simply don't get that long. Is there any real application dependent on that behavior?
https://bugs.winehq.org/show_bug.cgi?id=39867
--- Comment #9 from Fabian Maurer dark.shadow4@web.de --- *** Bug 48980 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=39867
--- Comment #10 from KRosUser kyle.kcsoftwares@gmail.com --- No specific application but a simple user input crashes the application and Wine under Linux. Poor robustness.
https://bugs.winehq.org/show_bug.cgi?id=39867
--- Comment #11 from whitequark@whitequark.org --- It's pretty easy to end up with a nested directory on Linux that has a path this long, especially since nothing on Linux minds it.
Moreover, even Windows no longer has this limitation baked into the OS any more: https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-lim...
https://bugs.winehq.org/show_bug.cgi?id=39867
--- Comment #12 from KRosUser kyle.kcsoftwares@gmail.com --- Could this MR provide some inspiration ?
https://bugs.winehq.org/show_bug.cgi?id=39867
--- Comment #13 from KRosUser kyle.kcsoftwares@gmail.com --- (In reply to KRosUser from comment #12)
Could this MR provide some inspiration ?
https://gitlab.winehq.org/wine/wine/-/merge_requests/6657