Commit 5d754fc9 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

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

errors.
parent 365a6d2e
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment