
24 Apr
2019
24 Apr
'19
5:54 a.m.
On Mon, 1 Apr 2019 at 14:01, Simon Goldschmidt simon.k.r.goldschmidt@gmail.com wrote:
If the malloc range passed to mem_malloc_init() is at the end of address range and 'start + size' overflows to 0, following allocations fail as mem_malloc_end is zero (which looks like uninitialized).
Fix this by subtracting 1 of 'start + size' overflows to zero.
Signed-off-by: Simon Goldschmidt simon.k.r.goldschmidt@gmail.com
Changes in v4: None Changes in v3: None
common/dlmalloc.c | 4 ++++ 1 file changed, 4 insertions(+)
Reviewed-by: Simon Glass sjg@chromium.org