]> begriffs open source - freertos/commit
Add heap protector to allocted heap blocks (#1125)
authorSaiiijchan <49641410+Saiiijchan@users.noreply.github.com>
Tue, 20 Aug 2024 13:04:43 +0000 (21:04 +0800)
committerGitHub <noreply@github.com>
Tue, 20 Aug 2024 13:04:43 +0000 (18:34 +0530)
commit18a168bcd2603354bcc5f8a408b2562d86709dd1
treec29a8264f257163e3fb742456f78b0deaa301086
parente43553af1e3d19a1eec27593c332f97e986cbd1c
Add heap protector to allocted heap blocks (#1125)

When validate those allocated heap block structure, the canary is not used.
Do xor with canary when allocating a new block.

Signed-off-by: wangfei_chen <wangfei_chen@realsil.com.cn>
Co-authored-by: wangfei_chen <wangfei_chen@realsil.com.cn>
portable/MemMang/heap_4.c
portable/MemMang/heap_5.c