Skip to content

Commit 7dbdfc6

Browse files
authored
Merge pull request #29 from vicLin8712/fix-false-positive-alarm
Fix false positive alarm in split_block() helper
2 parents 9c0420d + 7569c23 commit 7dbdfc6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/malloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ static inline void split_block(memblock_t *block, size_t size)
140140
size_t remaining;
141141
memblock_t *new_block;
142142

143-
if (unlikely(size >= GET_SIZE(block))) {
143+
if (unlikely(size > GET_SIZE(block))) {
144144
panic(ERR_HEAP_CORRUPT);
145145
return;
146146
}

0 commit comments

Comments
 (0)