From 4e23c18123f64350c3b37ea179302d4e0f647524 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 26 Feb 2004 11:32:20 +0000 Subject: [PATCH] * miscfuncs.cc (check_invalid_virtual_addr): Assure the last page in the range is always tested. Add appropriate const. * mmap.cc (mmap_record::aloc_fh): Remove unused static path_conf object. --- winsup/cygwin/ChangeLog | 6 ++++++ winsup/cygwin/miscfuncs.cc | 5 +++-- winsup/cygwin/mmap.cc | 1 - 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index e0361ea60..a6717d042 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2004-02-26 Brian Ford + + * miscfuncs.cc (check_invalid_virtual_addr): Assure the last page + in the range is always tested. Add appropriate const. + * mmap.cc (mmap_record::aloc_fh): Remove unused static path_conf object. + 2004-02-25 Christopher Faylor * exceptions.cc (setup_handler): Signal event for any sigwaitinfo if it diff --git a/winsup/cygwin/miscfuncs.cc b/winsup/cygwin/miscfuncs.cc index 7947365f4..d36a824af 100644 --- a/winsup/cygwin/miscfuncs.cc +++ b/winsup/cygwin/miscfuncs.cc @@ -218,9 +218,10 @@ int __stdcall check_invalid_virtual_addr (const void *s, unsigned sz) { MEMORY_BASIC_INFORMATION mbuf; - void *end; + const void *end; - for (end = (char *) s + sz; s < end; s = (char *) s + mbuf.RegionSize) + for (end = (char *) s + sz; s < end; + s = (char *) mbuf.BaseAddress + mbuf.RegionSize) if (!VirtualQuery (s, &mbuf, sizeof mbuf)) return EINVAL; return 0; diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc index cacefea41..394ed5987 100644 --- a/winsup/cygwin/mmap.cc +++ b/winsup/cygwin/mmap.cc @@ -295,7 +295,6 @@ mmap_record::alloc_fh () return &fh_paging_file; } - static path_conv pc; // should be thread safe - CGF /* The file descriptor could have been closed or, even worse, could have been reused for another file before the call to fork(). This requires creating a fhandler