From: Alan Modra <amodra@sourceware.org>
To: bfd-cvs@sourceware.org
Subject: [binutils-gdb] fuzzed file timeout
Date: Wed, 4 Jan 2023 13:32:13 +0000 (GMT) [thread overview]
Message-ID: <20230104133213.320953858C2B@sourceware.org> (raw)
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3bba9d93294a8172018731477df72c1c3ef42136
commit 3bba9d93294a8172018731477df72c1c3ef42136
Author: Alan Modra <amodra@gmail.com>
Date: Wed Jan 4 21:46:06 2023 +1030
fuzzed file timeout
objcopy of archive, element containing an object with a fuzzed section
size far exceeding the element size. copy_section detects this, but
the temp file is laid out for the large section. It can take a long
time to write terabytes of sparse file, a waste of time when it will
be deleted.
* objcopy.c (copy_archive): Don't write element contents after
bad status result from copy_object.
Diff:
---
binutils/objcopy.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index a6182b48b6c..4d888906e67 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -3686,7 +3686,8 @@ copy_archive (bfd *ibfd, bfd *obfd, const char *output_target,
if (!ok_object)
del = !copy_unknown_object (this_element, output_bfd);
- if (!(ok_object && !del ? bfd_close : bfd_close_all_done) (output_bfd))
+ if (!(ok_object && !del && !status
+ ? bfd_close : bfd_close_all_done) (output_bfd))
{
bfd_nonfatal_message (output_name, NULL, NULL, NULL);
/* Error in new object file. Don't change archive. */
reply other threads:[~2023-01-04 13: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=20230104133213.320953858C2B@sourceware.org \
--to=amodra@sourceware.org \
--cc=bfd-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).