mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 23:03:00 +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
1 changed files with 3 additions and 3 deletions
|
@ -418,7 +418,7 @@ MoveFileWithProgressW (
|
||||||
/* Get the file name */
|
/* Get the file name */
|
||||||
memset(&findBuffer,0,sizeof(WIN32_FIND_DATAW));
|
memset(&findBuffer,0,sizeof(WIN32_FIND_DATAW));
|
||||||
hFile = FindFirstFileW(lpExistingFileName2, &findBuffer);
|
hFile = FindFirstFileW(lpExistingFileName2, &findBuffer);
|
||||||
if (hFile == NULL)
|
if (hFile == INVALID_HANDLE_VALUE)
|
||||||
loop=FALSE;
|
loop=FALSE;
|
||||||
|
|
||||||
if (findBuffer.cFileName[0] == L'\0')
|
if (findBuffer.cFileName[0] == L'\0')
|
||||||
|
@ -446,14 +446,14 @@ MoveFileWithProgressW (
|
||||||
{
|
{
|
||||||
size = wcslen(lpExistingFileName2)-4;
|
size = wcslen(lpExistingFileName2)-4;
|
||||||
FindClose(hFile);
|
FindClose(hFile);
|
||||||
|
hFile = INVALID_HANDLE_VALUE;
|
||||||
|
|
||||||
wcscpy( &lpExistingFileName2[size],L"\0");
|
wcscpy( &lpExistingFileName2[size],L"\0");
|
||||||
|
|
||||||
if (wcsncmp(lpExistingFileName,lpExistingFileName2,size))
|
if (wcsncmp(lpExistingFileName,lpExistingFileName2,size))
|
||||||
{
|
{
|
||||||
DWORD Attributes;
|
DWORD Attributes;
|
||||||
|
|
||||||
FindClose(hFile);
|
|
||||||
|
|
||||||
/* delete folder */
|
/* delete folder */
|
||||||
TRACE("MoveFileWithProgressW : Delete folder : %S\n",lpDeleteFile);
|
TRACE("MoveFileWithProgressW : Delete folder : %S\n",lpDeleteFile);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue