
Hello JM, On Thu, 20 Feb 2025 12:40:53 +0100, Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org> wrote:
Hi Peter,
Thanks for the patch ! Tested and it works fine:
On 20/02/2025 11:11, Peter Seiderer wrote:
Fix null pointer access in case SUPPORT_LD_DEBUG configuration option is enabled.
Reported-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org> Link: https://mailman.openadk.org/mailman3/hyperkitty/list/devel@uclibc-ng.org/thr... Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org> Tested-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
Thanks for the quick (and positive) feedback, just sent out a v2 of the patch as I spotted the same old_val/reloc_addr usage pattern in _dl_do_lazy_reloc() and fixed that too... Regards, Peter
Thanks, JM
--- ldso/ldso/m68k/elfinterp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ldso/ldso/m68k/elfinterp.c b/ldso/ldso/m68k/elfinterp.c index 25ea23067..1536bd5b2 100644 --- a/ldso/ldso/m68k/elfinterp.c +++ b/ldso/ldso/m68k/elfinterp.c @@ -193,7 +193,7 @@ _dl_do_reloc(struct elf_resolve *tpnt, struct r_scope_elem *scope, #endif
#if defined (__SUPPORT_LD_DEBUG__) - old_val = *reloc_addr; + old_val = reloc_addr ? *reloc_addr : 0; #endif
switch (reloc_type) {