This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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]

_bfd_default_error_handler fix


Nick pointed out to me last night that if the format string passed to
_bfd_default_error_handler used %A or %B and ended in a normal printf
format specifer, then the trailing part of the format string would be
lost.  Nick also provided a fix, along with some other general cleanup
of the function.  Since he hasn't yet committed his changes, I'm
jumping in first with a simpler fix for the bug..

	* bfd.c (_bfd_default_error_handler): Correct loop exit.

Index: bfd/bfd.c
===================================================================
RCS file: /cvs/src/src/bfd/bfd.c,v
retrieving revision 1.68
diff -u -p -r1.68 bfd.c
--- bfd/bfd.c	28 Aug 2004 03:05:17 -0000	1.68
+++ bfd/bfd.c	4 Sep 2004 01:27:51 -0000
@@ -437,7 +437,7 @@ _bfd_default_error_handler (const char *
     abort ();
 
   p = fmt;
-  while (*p != '\0')
+  while (1)
     {
       char *q;
       size_t len, extra, trim;

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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