Don't return from overlapped ReadFile on EAGAIN and other non-fatal
errors.
This commit is contained in:
parent
365a6d2ee5
commit
5d754fc958
10
files/file.c
10
files/file.c
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue