cmd: Size buffer in create_full_path() correctly.

oldstable
Dan Kegel 2010-02-02 17:42:01 -08:00 committed by Alexandre Julliard
parent 60fe4dae7a
commit 15998c2bdb
1 changed files with 1 additions and 1 deletions

View File

@ -319,7 +319,7 @@ static BOOL create_full_path(WCHAR* path)
WCHAR *new_path;
BOOL ret = TRUE;
new_path = HeapAlloc(GetProcessHeap(),0,(strlenW(path) * sizeof(WCHAR))+1);
new_path = HeapAlloc(GetProcessHeap(),0,(strlenW(path)+1) * sizeof(WCHAR));
strcpyW(new_path,path);
while ((len = strlenW(new_path)) && new_path[len - 1] == '\\')