* winsup.h: Declare.
+2003-10-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * miscfunc.cc (__check_invalid_read_ptr): New function.
+ * winsup.h: Declare.
+
2003-10-26 Corinna Vinschen <corinna@vinschen.de>
* security.h (cygpsid::debug_print): Avoid compiler warnings.
}
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))
int __stdcall check_null_str_errno (const char *name) __attribute__ ((regparm(1)));
int __stdcall __check_null_invalid_struct (void *s, unsigned sz) __attribute__ ((regparm(2)));
int __stdcall __check_null_invalid_struct_errno (void *s, unsigned sz) __attribute__ ((regparm(2)));
+int __stdcall __check_invalid_read_ptr (const void *s, unsigned sz) __attribute__ ((regparm(2)));
int __stdcall __check_invalid_read_ptr_errno (const void *s, unsigned sz) __attribute__ ((regparm(2)));
#define check_null_invalid_struct(s) \