From: Alan Modra <amodra@sourceware.org>
To: binutils-cvs@sourceware.org
Subject: [binutils-gdb] dlltool: replace unchecked malloc with xmalloc
Date: Thu, 4 Apr 2024 08:16:01 +0000 (GMT) [thread overview]
Message-ID: <20240404081602.043123858404@sourceware.org> (raw)
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1bc2544b895f001cef00c9d71e70557dacb8ee55
commit 1bc2544b895f001cef00c9d71e70557dacb8ee55
Author: Nandakumar Edamana <nandakumar@nandakumar.co.in>
Date: Thu Apr 4 10:56:14 2024 +0530
dlltool: replace unchecked malloc with xmalloc
Diff:
---
binutils/dlltool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/binutils/dlltool.c b/binutils/dlltool.c
index 066c99a4d4f..7a3d20f0af9 100644
--- a/binutils/dlltool.c
+++ b/binutils/dlltool.c
@@ -876,7 +876,7 @@ dlltmp (char **buf, const char *fmt)
{
if (!*buf)
{
- *buf = malloc (strlen (tmp_prefix) + 64);
+ *buf = xmalloc (strlen (tmp_prefix) + 64);
sprintf (*buf, fmt, tmp_prefix);
}
return *buf;
reply other threads:[~2024-04-04 8:16 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=20240404081602.043123858404@sourceware.org \
--to=amodra@sourceware.org \
--cc=binutils-cvs@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).