Don't return from overlapped ReadFile on EAGAIN and other non-fatal

errors.
oldstable
Mike McCormack 2001-12-21 19:16:33 +00:00 committed by Alexandre Julliard
parent 365a6d2ee5
commit 5d754fc958
1 changed files with 8 additions and 2 deletions

View File

@ -1455,8 +1455,14 @@ BOOL WINAPI ReadFile( HANDLE hFile, LPVOID buffer, DWORD bytesToRead,
if(result<0)
{
FILE_SetDosError();
return FALSE;
if( (errno!=EAGAIN) && (errno!=EINTR) &&
((errno != EFAULT) || IsBadWritePtr( buffer, bytesToRead )) )
{
FILE_SetDosError();
return FALSE;
}
else
result = 0;
}
/* if we read enough to keep the app happy, then return now */