Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core: fix possible overflow in shdr_alloc_and_copy()
Prior to this patch, if SHDR_GET_SIZE() overflows it will return 0 and further down in the function lead to an out-of-bounds access. So fix this with an explicit test before using shdr_size in shdr_alloc_and_copy(). Fixes: 064663e ("core: crypto: add struct shdr helper functions") Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
- Loading branch information