diff options
author | Alan Modra <amodra@gmail.com> | 2020-08-26 20:12:42 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-08-26 23:23:45 +0930 |
commit | 32168ca6c361175af68b1858ddf889b5dc44512b (patch) | |
tree | b22a49da8951153ecbd32f25459409f9b3fccb13 /ld/emultempl | |
parent | 2d0ce6779c25fb28b3b35cee02871b9a8d4cd29b (diff) | |
download | gdb-32168ca6c361175af68b1858ddf889b5dc44512b.zip gdb-32168ca6c361175af68b1858ddf889b5dc44512b.tar.gz gdb-32168ca6c361175af68b1858ddf889b5dc44512b.tar.bz2 |
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.
Diffstat (limited to 'ld/emultempl')
-rw-r--r-- | ld/emultempl/spuelf.em | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ld/emultempl/spuelf.em b/ld/emultempl/spuelf.em index 56beb84..fc80a40 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"; |