shell32: Use MAX_PATH for a DOS path

André Hentschel nerv at dawncrow.de
Mon Oct 24 12:18:16 CDT 2011


The path sizes in the line above need some more thinking, but i first need to talk to Andrew Eikum, as he touched that code a year ago and might have some ideas.
Anyway PATH_MAX is wrong for the dospath
---
 dlls/shell32/shfldr_unixfs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/shell32/shfldr_unixfs.c b/dlls/shell32/shfldr_unixfs.c
index 606fa84..2dc5920 100644
--- a/dlls/shell32/shfldr_unixfs.c
+++ b/dlls/shell32/shfldr_unixfs.c
@@ -369,7 +369,7 @@ static inline BOOL UNIXFS_is_pidl_of_type(LPCITEMIDLIST pIDL, SHCONTF fFilter) {
 static BOOL UNIXFS_get_unix_path(LPCWSTR pszDosPath, char *pszCanonicalPath)
 {
     char *pPathTail, *pElement, *pCanonicalTail, szPath[FILENAME_MAX], *pszUnixPath, has_failed = 0, mb_path[FILENAME_MAX];
-    WCHAR wszDrive[] = { '?', ':', '\\', 0 }, dospath[PATH_MAX], *dospath_end;
+    WCHAR wszDrive[] = { '?', ':', '\\', 0 }, dospath[MAX_PATH], *dospath_end;
     int cDriveSymlinkLen;
     void *redir;
 
-- 

Best Regards, André Hentschel



More information about the wine-patches mailing list