Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2003-10-27 11:28:37 +0300
committerCorinna Vinschen <corinna@vinschen.de>2003-10-27 11:28:37 +0300
commitd845665e0f04feb9a0ef927fce1392568a51f90f (patch)
tree1f4c97e3eb200f3ace59a43a1a80a9806f5043d5 /winsup/cygwin/miscfuncs.cc
parentdb30fe125f32439c108468319c98caaa94dfe7bb (diff)
* miscfunc.cc (__check_invalid_read_ptr): New function.
* winsup.h: Declare.
Diffstat (limited to 'winsup/cygwin/miscfuncs.cc')
-rw-r--r--winsup/cygwin/miscfuncs.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/winsup/cygwin/miscfuncs.cc b/winsup/cygwin/miscfuncs.cc
index d9e4a7adb..be7c8a30e 100644
--- a/winsup/cygwin/miscfuncs.cc
+++ b/winsup/cygwin/miscfuncs.cc
@@ -199,6 +199,14 @@ __check_null_invalid_struct_errno (void *s, unsigned sz)
}
int __stdcall
+__check_invalid_read_ptr (const void *s, unsigned sz)
+{
+ if (s && !IsBadReadPtr (s, sz))
+ return 0;
+ return EFAULT;
+}
+
+int __stdcall
__check_invalid_read_ptr_errno (const void *s, unsigned sz)
{
if (s && !IsBadReadPtr (s, sz))