kernel: Fixed off-by-one error in GetShortPathNameW.
This commit is contained in:
parent
fce74f7411
commit
5c324c8188
|
@ -481,7 +481,7 @@ DWORD WINAPI GetShortPathNameW( LPCWSTR longpath, LPWSTR shortpath, DWORD shortl
|
||||||
tmplen = p - (longpath + lp);
|
tmplen = p - (longpath + lp);
|
||||||
lstrcpynW(tmpshortpath + sp, longpath + lp, tmplen + 1);
|
lstrcpynW(tmpshortpath + sp, longpath + lp, tmplen + 1);
|
||||||
/* Check, if the current element is a valid dos name */
|
/* Check, if the current element is a valid dos name */
|
||||||
if (tmplen <= 8+1+3+1)
|
if (tmplen <= 8+1+3)
|
||||||
{
|
{
|
||||||
BOOLEAN spaces;
|
BOOLEAN spaces;
|
||||||
memcpy(ustr_buf, longpath + lp, tmplen * sizeof(WCHAR));
|
memcpy(ustr_buf, longpath + lp, tmplen * sizeof(WCHAR));
|
||||||
|
|
Loading…
Reference in New Issue