diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2004-02-26 14:32:20 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2004-02-26 14:32:20 +0300 |
commit | 4e23c18123f64350c3b37ea179302d4e0f647524 (patch) | |
tree | 83412ee48475b26a75b5655d7ab506cbb75da9a7 /winsup/cygwin/miscfuncs.cc | |
parent | ca713cfab35fe144b73240ebe2c333c36fd7a214 (diff) |
* 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.
Diffstat (limited to 'winsup/cygwin/miscfuncs.cc')
-rw-r--r-- | winsup/cygwin/miscfuncs.cc | 5 |
1 files changed, 3 insertions, 2 deletions
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; |