diff options
author | Alan Modra <amodra@gmail.com> | 2021-11-04 14:11:02 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2021-11-04 14:16:53 +1030 |
commit | f2f105f518413ea3e4c212f89585f9a8a5dddcdd (patch) | |
tree | fc17edfe13b1962017f22c3e4c9cdefcde5b4907 /binutils/objdump.c | |
parent | 8f015689086c99a512e95c7163bd612daba30cf2 (diff) | |
download | gdb-f2f105f518413ea3e4c212f89585f9a8a5dddcdd.zip gdb-f2f105f518413ea3e4c212f89585f9a8a5dddcdd.tar.gz gdb-f2f105f518413ea3e4c212f89585f9a8a5dddcdd.tar.bz2 |
PR28540, segmentation fault on NULL byte_get
PR 28540
* objdump.c (dump_bfd): Don't attempt load_separate_debug_files
when byte_get is NULL.
Diffstat (limited to 'binutils/objdump.c')
-rw-r--r-- | binutils/objdump.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/binutils/objdump.c b/binutils/objdump.c index 356e3ec..1bfb5c7 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -4862,7 +4862,7 @@ dump_bfd (bfd *abfd, bool is_mainfile) The test on is_mainfile is there because the chain of separate debug info files is a global variable shared by all invocations of dump_bfd. */ - if (is_mainfile) + if (byte_get != NULL && is_mainfile) { load_separate_debug_files (abfd, bfd_get_filename (abfd)); |