From: Alan Modra Date: Wed, 26 Aug 2020 10:42:42 +0000 (+0930) Subject: PR26499 UBSAN: eelf32_spu.c:537 member access null pointer X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=32168ca6c361175af68b1858ddf889b5dc44512b;p=binutils-gdb.git PR26499 UBSAN: eelf32_spu.c:537 member access null pointer Another &p->field. PR 26499 * emultempl/spuelf.em (spu_elf_relink): Check for NULL tmp_file_list. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 882e1c920e3..66246080332 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2020-08-26 Alan Modra + + PR 26499 + * emultempl/spuelf.em (spu_elf_relink): Check for NULL tmp_file_list. + 2020-08-26 Alan Modra PR 26431 diff --git a/ld/emultempl/spuelf.em b/ld/emultempl/spuelf.em index 56beb84f99c..fc80a401727 100644 --- a/ld/emultempl/spuelf.em +++ b/ld/emultempl/spuelf.em @@ -395,7 +395,7 @@ spu_elf_relink (void) memcpy (argv, my_argv, my_argc * sizeof (*argv)); argv[my_argc++] = "--no-auto-overlay"; - if (tmp_file_list->name == auto_overlay_file) + if (tmp_file_list != NULL && tmp_file_list->name == auto_overlay_file) argv[my_argc - 1] = concat (argv[my_argc - 1], "=", auto_overlay_file, (const char *) NULL); argv[my_argc++] = "-T";