Remove useless calls to IsBadReadPtr from ReadFile and WriteFile.

This commit is contained in:
Dmitry Timoshkov 2004-11-24 18:07:52 +00:00 committed by Alexandre Julliard
parent c329cc4f9c
commit b3d647384c
1 changed files with 0 additions and 11 deletions

View File

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