* miscfuncs.cc (+__check_invalid_read_ptr_errno): New function.

* syscalls.c (_write): Validate that write buffer is accessible for reading,
not writing.
* winsup.h: Declare new function, increase regparmization of check_* functions.
This commit is contained in:
Christopher Faylor
2001-10-20 05:08:21 +00:00
parent 5318c49833
commit 6fdd213161
4 changed files with 21 additions and 3 deletions

View File

@@ -344,7 +344,7 @@ _read (int fd, void *ptr, size_t len)
extern "C" ssize_t
_write (int fd, const void *ptr, size_t len)
{
if (__check_null_invalid_struct_errno (ptr, len))
if (__check_invalid_read_ptr_errno (ptr, len))
return -1;
int res = -1;