Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.15.0, 6.3.0
-
-
e21522b8bf (qt/qtbase/dev) e21522b8bf (qt/tqtc-qtbase/dev) 9fc2a1f4c5 (qt/tqtc-qtbase/6.2) 15d4bb9940 (qt/tqtc-qtbase/5.15)
Description
Hello,
There seems to be an issue using QDir on windows when working with very large file paths.
For example if one tries to use QDir::current() or QDir::currentPath() , you get some un-expected behavior. This occurs when the path one is trying to get is over 260 characters in length.
This seems to be in part due to the fact that qfilesystemengine_win.cpp uses a PATH_MAX instead of using the actual size of the path. This results in undesirable behavior when this maximum path length is exceeded, like when the path is over 260 characters.
QDir::currentPath() for example returns a string containing uninitialized memory in this situation.