* miscfunc.cc (__check_invalid_read_ptr): New function.
* winsup.h: Declare.
This commit is contained in:
parent
db30fe125f
commit
d845665e0f
@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
@ -198,6 +198,14 @@ __check_null_invalid_struct_errno (void *s, unsigned sz)
|
||||
return err;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
@ -250,6 +250,7 @@ int __stdcall check_null_empty_str_errno (const char *name) __attribute__ ((regp
|
||||
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) \
|
||||
|
Loading…
Reference in New Issue
Block a user