malloc_simple: fix malloc_ptr calculation
The gd->malloc_ptr and the gd->malloc_limit are offsets to gd->malloc_base. But the addr variable contains the absolute address. The new_ptr must be: addr + bytes - gd->malloc_base. Signed-off-by: NPhilipp Rosenberger <ilu@linutronix.de> Reviewed-by: NHans de Goede <hdegoede@redhat.com>
Showing
想要评论请 注册 或 登录