diff options
author | Christopher Faylor <me@cgf.cx> | 2001-10-20 09:08:21 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-10-20 09:08:21 +0400 |
commit | 6fdd213161e7795b55ac1c0a4f70d02d13f53f82 (patch) | |
tree | 5c1a107449d272712c0904114c9ac0181bfac07c /winsup/cygwin/syscalls.cc | |
parent | 5318c4983306850bffa748b4feaa87f7c6d666bb (diff) |
* 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.
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r-- | winsup/cygwin/syscalls.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 70d66dd59..1fa7c37ee 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -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; |