diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 4d2c4295a..68ce1afa8 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2001-10-22 Corinna Vinschen + + * miscfuncs.cc (__check_invalid_read_ptr_errno): Return error, if any. + 2001-10-21 Christopher Faylor * resource.cc (fill_rusage): Perform paranoid zero structure passed to diff --git a/winsup/cygwin/miscfuncs.cc b/winsup/cygwin/miscfuncs.cc index 63b05d975..ecc5bd203 100644 --- a/winsup/cygwin/miscfuncs.cc +++ b/winsup/cygwin/miscfuncs.cc @@ -158,7 +158,7 @@ int __stdcall __check_invalid_read_ptr_errno (const void *s, unsigned sz) { if (!s || IsBadReadPtr ((void *) s, sz)) - set_errno (EFAULT); + return set_errno (EFAULT); return 0; }