This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA] archive.c, _bfd_slurp_extended_name_table, Fail if bfd_seek fails.


OK?

2011-03-03  Michael Snyder  <msnyder@vmware.com>

	* archive.c (_bfd_slurp_extended_name_table): Fail if bfd_seek 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:54:26 -0000
@@ -1220,7 +1222,9 @@ _bfd_slurp_extended_name_table (bfd *abf
 
   /* FIXME:  Formatting sucks here, and in case of failure of BFD_READ,
      we probably don't want to return TRUE.  */
-  bfd_seek (abfd, bfd_ardata (abfd)->first_file_filepos, SEEK_SET);
+  if (bfd_seek (abfd, bfd_ardata (abfd)->first_file_filepos, SEEK_SET) != 0)
+    return FALSE;
+
   if (bfd_bread (nextname, 16, abfd) == 16)
     {
       if (bfd_seek (abfd, (file_ptr) -16, SEEK_CUR) != 0)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]