From: Alan Modra <amodra@gmail.com>
To: binutils@sourceware.org
Subject: Sanity check dwarf5 form of .file
Date: Fri, 27 Jan 2023 08:22:59 +1030 [thread overview]
Message-ID: <Y9L2O3TbmvhYyhsC@squeak.grove.modra.org> (raw)
There's a comment a few lines earlier saying that demand_copy_C_string
has already reported an error if it returns NULL. Given the proximity
I decided not to duplicate the comment.
* dwarf2dbg.c (dwarf2_directive_filename): Check return of
demand_copy_C_string for file.
diff --git a/gas/dwarf2dbg.c b/gas/dwarf2dbg.c
index 86dc16108e4..5f2f58ff7b0 100644
--- a/gas/dwarf2dbg.c
+++ b/gas/dwarf2dbg.c
@@ -1195,6 +1195,8 @@ dwarf2_directive_filename (void)
{
dirname = filename;
filename = demand_copy_C_string (&filename_len);
+ if (filename == NULL)
+ return NULL;
SKIP_WHITESPACE ();
}
--
Alan Modra
Australia Development Lab, IBM
reply other threads:[~2023-01-26 21:53 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=Y9L2O3TbmvhYyhsC@squeak.grove.modra.org \
--to=amodra@gmail.com \
--cc=binutils@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).