Fix buffer overflow in PathSetDlgItemPathW that led to a trashed

stack.
This commit is contained in:
James Hawkins 2004-09-02 20:08:57 +00:00 committed by Alexandre Julliard
parent a355c84d28
commit fc403eb5e0
1 changed files with 1 additions and 1 deletions

View File

@ -3500,7 +3500,7 @@ VOID WINAPI PathSetDlgItemPathW(HWND hDlg, int id, LPCWSTR lpszPath)
return;
if (lpszPath)
strncpyW(path, lpszPath, sizeof(path));
lstrcpynW(path, lpszPath, sizeof(path) / sizeof(WCHAR));
else
path[0] = '\0';