From: Michael Snyder <msnyder@vmware.com>
To: nickc@redhat.com, rth@redhat.com, bug-binutils@gnu.org,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: [RFA] archive.c, bsd_write_armap, fail if stat fails
Date: Thu, 03 Mar 2011 18:46:00 -0000 [thread overview]
Message-ID: <4D6FE1F1.1010501@vmware.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 41 bytes --]
Perhaps nit-picky -- what do you think?
[-- Attachment #2: archive.txt --]
[-- Type: text/plain, Size: 797 bytes --]
2011-03-03 Michael Snyder <msnyder@vmware.com>
* archive.c (bsd_write_armap): Fail if stat fails.
Index: archive.c
===================================================================
RCS file: /cvs/src/src/bfd/archive.c,v
retrieving revision 1.72
diff -u -p -u -p -r1.72 archive.c
--- archive.c 28 Feb 2011 18:30:16 -0000 1.72
+++ archive.c 3 Mar 2011 18:40:54 -0000
@@ -2304,7 +2304,11 @@ bsd_write_armap (bfd *arch,
firstreal = mapsize + elength + sizeof (struct ar_hdr) + SARMAG;
- stat (arch->filename, &statbuf);
+ if (stat (arch->filename, &statbuf) != 0)
+ {
+ bfd_set_error (bfd_error_system_call);
+ return FALSE;
+ }
if ((arch->flags & BFD_DETERMINISTIC_OUTPUT) == 0)
{
/* Remember the timestamp, to keep it holy. But fudge it a little. */
next reply other threads:[~2011-03-03 18:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-03 18:46 Michael Snyder [this message]
2011-03-03 22:25 ` Alan Modra
2011-03-03 23:39 ` Michael Snyder
2011-03-04 1:22 ` Alan Modra
2011-03-04 13:00 ` Nick Clifton
2011-03-04 12:59 ` Nick Clifton
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=4D6FE1F1.1010501@vmware.com \
--to=msnyder@vmware.com \
--cc=bug-binutils@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=nickc@redhat.com \
--cc=rth@redhat.com \
/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