Re: [PATCH v46 0/1] MR10192: kernelbase: Handle extended length path prefix in GetLongPathNameW
Akihiro Sagawa (@sgwaki) commented about dlls/kernelbase/file.c:
+ if (wcsnicmp(shortpath + 4, L"UNC\\", 4) == 0) { + FIXME("UNC Extended pathname %s\n", debugstr_w(shortpath)); + tmplen = lstrlenW(shortpath); + if (tmplen < longlen) { + if (longpath != shortpath) + lstrcpyW(longpath, shortpath); + return tmplen; + } + return tmplen + 1; + } else if (shortpath[4] && shortpath[5] == ':') { + tmplongpath[0] = '\\'; + tmplongpath[1] = '\\'; + tmplongpath[2] = '?'; + tmplongpath[3] = '\\'; + tmplongpath[4] = shortpath[4]; + tmplongpath[5] = shortpath[5]; Since you're copying six characters manually, couldn't this be rewritten as `lstrcpynW(tmplongpath, shortpath, 6)` ?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/10192#note_134940
participants (1)
-
Akihiro Sagawa (@sgwaki)