zephyr/kernel
Leandro Pereira b902da3599 kernel: mempool: Check for overflow in k_malloc()
If a large size is requested, the expression `size += sizeof(...)`
might overflow, leading to a small block being requested and returned
by k_malloc().

Use a GCC builtin to trap the overflow and return NULL in this case.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-04-12 14:27:24 -07:00
..
include license: fix spdx identifier in a few files 2018-04-12 15:19:51 -04:00
alert.c
atomic_c.c
CMakeLists.txt lib: posix: Move posix layer from 'kernel' to 'lib' 2018-04-05 16:43:05 -04:00
compiler_stack_protect.c
device.c
errno.c
idle.c kernel: Name of static functions should not begin with an underscore 2018-03-10 08:39:10 -05:00
init.c build: use git version and hash for boot banner 2018-04-10 10:57:50 -04:00
int_latency_bench.c
Kconfig kernel: Disable build timestamps by default for reproducibility 2018-04-09 18:52:55 -04:00
Kconfig.event_logger
Kconfig.power_mgmt
mailbox.c kernel: Name of static functions should not begin with an underscore 2018-03-10 08:39:10 -05:00
mem_domain.c
mem_slab.c
mempool.c kernel: mempool: Check for overflow in k_malloc() 2018-04-12 14:27:24 -07:00
msg_q.c kernel: msg_q: Add routine to fetch basic attrs from message queue. 2018-04-03 15:30:44 -04:00
mutex.c kernel: mutex: Copy assertions to assertions to syscall handler 2018-04-06 11:52:32 -07:00
pipes.c kernel: Name of static functions should not begin with an underscore 2018-03-10 08:39:10 -05:00
poll.c kernel: Cleanup, unify _add_thread_to_ready_q() and _ready_thread() 2018-03-18 16:58:12 -04:00
queue.c kernel/queue: Clean up scheduler API usage 2018-03-18 16:58:12 -04:00
sched.c kernel/sched: Clean up docs for _pend_thread(), limit scope 2018-03-18 16:58:12 -04:00
sem.c
smp.c kernel: Name of static functions should not begin with an underscore 2018-03-10 08:39:10 -05:00
stack.c
sys_clock.c
system_work_q.c
thread_abort.c
thread.c kernel: Fix building of k_thread_create 2018-04-10 22:26:01 -04:00
timer.c
userspace_handler.c
userspace.c kernel: Name of static functions should not begin with an underscore 2018-03-10 08:39:10 -05:00
version.c
work_q.c