From 5c324c81882c174b48c89480029a6ccc147daec9 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Sun, 27 Aug 2006 20:15:58 +0200 Subject: [PATCH] kernel: Fixed off-by-one error in GetShortPathNameW. --- dlls/kernel/path.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/kernel/path.c b/dlls/kernel/path.c index c4d7677ae35..ddd169ca6f7 100644 --- a/dlls/kernel/path.c +++ b/dlls/kernel/path.c @@ -481,7 +481,7 @@ DWORD WINAPI GetShortPathNameW( LPCWSTR longpath, LPWSTR shortpath, DWORD shortl tmplen = p - (longpath + lp); lstrcpynW(tmpshortpath + sp, longpath + lp, tmplen + 1); /* Check, if the current element is a valid dos name */ - if (tmplen <= 8+1+3+1) + if (tmplen <= 8+1+3) { BOOLEAN spaces; memcpy(ustr_buf, longpath + lp, tmplen * sizeof(WCHAR));