From b3d647384ccfd53bc21847b49811ee73dc3d9bbe Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Wed, 24 Nov 2004 18:07:52 +0000 Subject: [PATCH] Remove useless calls to IsBadReadPtr from ReadFile and WriteFile. --- dlls/kernel/file.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/dlls/kernel/file.c b/dlls/kernel/file.c index 807fbb4dde..342b32475f 100644 --- a/dlls/kernel/file.c +++ b/dlls/kernel/file.c @@ -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; -- 2.32.0.93.g670b81a890