public inbox for gdb-testers@sourceware.org help / color / mirror / Atom feed
From: gdb-buildbot@sergiodj.net To: gdb-testers@sourceware.org Subject: [binutils-gdb] PR25842, Null pointer dereference in nm-new Date: Sat, 02 May 2020 00:40:11 -0400 [thread overview] Message-ID: <8d55d10ac0d112c586eaceb92e75bd9b80aadcc4@gdb-build> (raw) *** TEST RESULTS FOR COMMIT 8d55d10ac0d112c586eaceb92e75bd9b80aadcc4 *** commit 8d55d10ac0d112c586eaceb92e75bd9b80aadcc4 Author: Alan Modra <amodra@gmail.com> AuthorDate: Fri Apr 17 08:29:15 2020 +0930 Commit: Alan Modra <amodra@gmail.com> CommitDate: Fri Apr 17 10:56:01 2020 +0930 PR25842, Null pointer dereference in nm-new PR 25842 * elf.c (_bfd_elf_get_symbol_version_string): Don't segfault on NULL nodename. diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 7f361d7fb1..b9ee79572a 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2020-04-17 Alan Modra <amodra@gmail.com> + + PR 25842 + * elf.c (_bfd_elf_get_symbol_version_string): Don't segfault on + NULL nodename. + 2020-04-16 Nick Clifton <nickc@redhat.com> PR 25803 diff --git a/bfd/elf.c b/bfd/elf.c index 3d2eee9ea8..f3364eeddf 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -1911,8 +1911,12 @@ _bfd_elf_get_symbol_version_string (bfd *abfd, asymbol *symbol, { const char *nodename = elf_tdata (abfd)->verdef[vernum - 1].vd_nodename; - version_string = ((base_p || strcmp (symbol->name, nodename)) - ? nodename : ""); + version_string = ""; + if (base_p + || nodename == NULL + || symbol->name == NULL + || strcmp (symbol->name, nodename) != 0) + version_string = nodename; } else {
next reply other threads:[~2020-05-02 4:40 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-05-02 4:40 gdb-buildbot [this message] 2020-05-02 4:40 ` Failures on Fedora-x86_64-m32, branch master gdb-buildbot 2020-05-02 5:13 ` Failures on Fedora-x86_64-m64, " gdb-buildbot 2020-05-02 5:20 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " gdb-buildbot 2020-05-02 5:57 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " gdb-buildbot 2020-05-02 17:13 ` Failures on Fedora-x86_64-native-gdbserver-m32, " gdb-buildbot 2020-05-03 18:10 ` Failures on Fedora-x86_64-native-gdbserver-m64, " gdb-buildbot 2020-05-07 9:03 ` Failures on Ubuntu-Aarch64-native-gdbserver-m64, " gdb-buildbot
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=8d55d10ac0d112c586eaceb92e75bd9b80aadcc4@gdb-build \ --to=gdb-buildbot@sergiodj.net \ --cc=gdb-testers@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).