From 8b6234ca12393fdb9824a3ddd2dca5807804b75b Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 22 Oct 2001 11:31:39 +0000 Subject: [PATCH] * miscfuncs.cc (__check_invalid_read_ptr_errno): Return error, if any. --- winsup/cygwin/ChangeLog | 4 ++++ winsup/cygwin/miscfuncs.cc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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; }