mirror of
https://github.com/reactos/reactos.git
synced 2024-08-07 19:58:21 +00:00
[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:
parent
89c7718c10
commit
ef85e78ddd
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue