From: Dodji Seketeli <dodji@redhat.com>
To: libabigail@sourceware.org
Subject: [PATCH, applied] elf-reader: Avoid crashing when looking at non-existing variable symbol
Date: Fri, 10 May 2024 00:32:09 +0200 [thread overview]
Message-ID: <87seyq8vme.fsf@redhat.com> (raw)
Hello,
* src/abg-elf-reader.cc (reader::variable_symbol_is_exported): Do
not crash when the symbol we are looking at is non-present.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Applied to master branch.
---
src/abg-elf-reader.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/abg-elf-reader.cc b/src/abg-elf-reader.cc
index 80720716..610f8617 100644
--- a/src/abg-elf-reader.cc
+++ b/src/abg-elf-reader.cc
@@ -874,7 +874,7 @@ elf_symbol_sptr
reader::variable_symbol_is_exported(const string& name) const
{
const elf_symbol_sptr s = symtab()->variable_symbol_is_exported(name);
- if (s->is_variable() && s->is_public())
+ if (s && s->is_variable() && s->is_public())
{
bool looking_at_linux_kernel_binary =
(load_in_linux_kernel_mode()
--
2.39.3
--
Dodji
reply other threads:[~2024-05-09 22:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=87seyq8vme.fsf@redhat.com \
--to=dodji@redhat.com \
--cc=libabigail@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: link
Be 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).