Commit b3d64738 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

Remove useless calls to IsBadReadPtr from ReadFile and WriteFile.

parent c329cc4f
......@@ -358,11 +358,6 @@ BOOL WINAPI ReadFile( HANDLE hFile, LPVOID buffer, DWORD bytesToRead,
if (bytesRead) *bytesRead = 0; /* Do this before anything else */
if (!bytesToRead) return TRUE;
if (IsBadReadPtr(buffer, bytesToRead))
{
SetLastError(ERROR_WRITE_FAULT); /* FIXME */
return FALSE;
}
if (is_console_handle(hFile))
return ReadConsoleA(hFile, buffer, bytesToRead, bytesRead, NULL);
......@@ -441,12 +436,6 @@ BOOL WINAPI WriteFile( HANDLE hFile, LPCVOID buffer, DWORD bytesToWrite,
if (is_console_handle(hFile))
return WriteConsoleA(hFile, buffer, bytesToWrite, bytesWritten, NULL);
if (IsBadReadPtr(buffer, bytesToWrite))
{
SetLastError(ERROR_READ_FAULT); /* FIXME */
return FALSE;
}
if (overlapped)
{
offset.u.LowPart = overlapped->Offset;
......
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