Patch by buggy@ifel.se.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45218 Signed-off-by: Andrew Eikum aeikum@codeweavers.com ---
Off-by-one error. We want to quit early if start is outside the range. start is outside the range if it is equal to base+size.
dlls/ntdll/virtual.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index 76dc6c284d..fb6ede656e 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -2756,7 +2756,7 @@ static int get_free_mem_state_callback( void *start, size_t size, void *arg ) MEMORY_BASIC_INFORMATION *info = arg; void *end = (char *)start + size;
- if ((char *)info->BaseAddress + info->RegionSize < (char *)start) return 0; + if ((char *)info->BaseAddress + info->RegionSize <= (char *)start) return 0;
if (info->BaseAddress >= end) {