shell32: Use the right defines for path lengths

André Hentschel nerv at dawncrow.de
Fri Oct 14 13:41:17 CDT 2011


FILENAME_MAX == MAX_PATH, but MAX_PATH makes more sense for a path variable
and i doubt we'll get a dospath with PATH_MAX length. I checked the code and it's really just used for dos paths...
---
 dlls/shell32/shfldr_unixfs.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/shell32/shfldr_unixfs.c b/dlls/shell32/shfldr_unixfs.c
index 9649df8..710cc55 100644
--- a/dlls/shell32/shfldr_unixfs.c
+++ b/dlls/shell32/shfldr_unixfs.c
@@ -368,8 +368,8 @@ 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;
+    char *pPathTail, *pElement, *pCanonicalTail, szPath[MAX_PATH], *pszUnixPath, has_failed = 0, mb_path[MAX_PATH];
+    WCHAR wszDrive[] = { '?', ':', '\\', 0 }, dospath[MAX_PATH], *dospath_end;
     int cDriveSymlinkLen;
     void *redir;
 
-- 

Best Regards, André Hentschel



More information about the wine-patches mailing list