From 0f00932955521c3c2fb8140176ab72f22172c298 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Fri, 26 Feb 2021 14:51:13 +0100 Subject: Started UBSan and stack-smashing check support --- libc/mem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libc/mem.c') diff --git a/libc/mem.c b/libc/mem.c index 70429ca..7e9590a 100644 --- a/libc/mem.c +++ b/libc/mem.c @@ -287,8 +287,8 @@ void heap_init(u32 start) init_region->size = HEAP_INIT_SIZE - OVERHEAD; node_create_foot(init_region); node_add(&heap.bins[bin_index(init_region->size)], init_region); - heap.start = start; - heap.end = start + HEAP_INIT_SIZE; + heap.start = (u32)start; + heap.end = (u32)start + HEAP_INIT_SIZE; } static void *_malloc(u32 size) -- cgit v1.2.3