Commit c74c04a
committed
Add next block adjacency check to validate_block()
The allocator previously only validated the size and bounds of a memory
block. It did not check whether the block's successor was physically
adjacent in memory.
Extend validate_block() to verify that a block's next pointer matches
the expected location based on its size. This ensures corruption in the
linked list of blocks is detected early and consistently.1 parent 9e55af4 commit c74c04a
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
59 | 64 | | |
60 | 65 | | |
61 | 66 | | |
| |||
0 commit comments