* 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.
This commit is contained in:
Corinna Vinschen
2004-02-26 11:32:20 +00:00
parent ca713cfab3
commit 4e23c18123
3 changed files with 9 additions and 3 deletions

View File

@ -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;