[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFA] archive.c, bsd_write_armap, fail if stat fails
From: |
Michael Snyder |
Subject: |
[RFA] archive.c, bsd_write_armap, fail if stat fails |
Date: |
Thu, 03 Mar 2011 10:46:09 -0800 |
User-agent: |
Thunderbird 2.0.0.24 (X11/20101201) |
Perhaps nit-picky -- what do you think?
2011-03-03 Michael Snyder <address@hidden>
* 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. */
- [RFA] archive.c, bsd_write_armap, fail if stat fails,
Michael Snyder <=