Rémi Bernon : ntdll: Ignore back pointer when validating free block pattern.

Alexandre Julliard julliard at winehq.org
Thu May 19 16:15:12 CDT 2022


Module: wine
Branch: master
Commit: 2815c117bcfefe4889b35701734435d578772af2
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=2815c117bcfefe4889b35701734435d578772af2

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Thu May 19 09:13:20 2022 +0200

ntdll: Ignore back pointer when validating free block pattern.

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/heap.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c
index 44c9ad53196..e4a307bd23a 100644
--- a/dlls/ntdll/heap.c
+++ b/dlls/ntdll/heap.c
@@ -1182,6 +1182,7 @@ static BOOL validate_free_block( const SUBHEAP *subheap, const struct block *blo
     if (!err && (flags & HEAP_FREE_CHECKING_ENABLED))
     {
         const char *ptr = (char *)(entry + 1), *end = (char *)block + block_get_size( block );
+        if (next) end -= sizeof(struct block *);
         if (end > commit_end) end = commit_end;
         while (!err && ptr < end)
         {




More information about the wine-cvs mailing list