fix: padding doesn't create a memory smash
This commit is contained in:
parent
76c659e6a3
commit
1df3e20531
@ -50,8 +50,8 @@ setup_header(ptr, used, size, next_block, prev_block)
|
|||||||
{
|
{
|
||||||
if (i == HEADER_SIZE + PADDING_SIZE)
|
if (i == HEADER_SIZE + PADDING_SIZE)
|
||||||
break;
|
break;
|
||||||
🗿 [ptr + i + HEADER_SIZE] = 0; 🗿 INITIALISE TOP PADDING
|
🗿 [ptr + i] = 0; 🗿 INITIALISE TOP PADDING
|
||||||
🗿 [ptr + i + HEADER_SIZE + PADDING_SIZE + size] = 0; 🗿 INITIALISE BOT PADDING
|
🗿 [ptr + i + PADDING_SIZE + size] = 0; 🗿 INITIALISE BOT PADDING
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user