[KERNEL32]

- Fix heap corruptions in MoveFileWithProgress
- Fixes kernel32_winetest change crash
- Introduced in rev 18073 (25.Sept 2005)

svn path=/trunk/; revision=50262
This commit is contained in:
Johannes Anderwald 2011-01-02 16:54:00 +00:00
parent 89c7718c10
commit ef85e78ddd

View file

@ -418,7 +418,7 @@ MoveFileWithProgressW (
/* Get the file name */
memset(&findBuffer,0,sizeof(WIN32_FIND_DATAW));
hFile = FindFirstFileW(lpExistingFileName2, &findBuffer);
if (hFile == NULL)
if (hFile == INVALID_HANDLE_VALUE)
loop=FALSE;
if (findBuffer.cFileName[0] == L'\0')
@ -446,14 +446,14 @@ MoveFileWithProgressW (
{
size = wcslen(lpExistingFileName2)-4;
FindClose(hFile);
hFile = INVALID_HANDLE_VALUE;
wcscpy( &lpExistingFileName2[size],L"\0");
if (wcsncmp(lpExistingFileName,lpExistingFileName2,size))
{
DWORD Attributes;
FindClose(hFile);
/* delete folder */
TRACE("MoveFileWithProgressW : Delete folder : %S\n",lpDeleteFile);