Skip to content
Snippets Groups Projects
Commit 5d754fc9 authored by Michael McCormack's avatar Michael McCormack Committed by Alexandre Julliard
Browse files

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

errors.
parent 365a6d2e
No related branches found
No related tags found
No related merge requests found
......@@ -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 */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment