Searched hist:d2a6dea7634010985e9ce2f140aa0a330af596c9 (Results 1 – 1 of 1) sorted by relevance
| /optee_os/ldelf/ |
| H A D | ta_elf.c | d2a6dea7634010985e9ce2f140aa0a330af596c9 Wed Mar 04 11:36:59 UTC 2020 Jens Wiklander <jens.wiklander@linaro.org> ldelf: fix possible integer overflow in init_elf()
The size of the program headers is calculated as: e_phoff + e_phnum * e_phentsize This can overflow for large values leading to the 4k size check to fail. Fix this by using MUL_OVERFLOW() and ADD_OVERFLOW() instead.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reported-by: Martijn Bogaard <martijn@riscure.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
|