Skip to content
Commit 59399704 authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Anas Nashif
Browse files

lib/os/heap: fix out-of-bounds usage of memcpy() in sys_heap_realloc()



The sys_heap_realloc() code falls back to allocating new memory
and copying the existing data over when it cannot adjust the size
in place. However the size of the data to copy should be the old
size and not the new size if we're extending the allocation.

Signed-off-by: default avatarNicolas Pitre <npitre@baylibre.com>
parent c822e0ab
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment