This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
_bfd_default_error_handler fix
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sources dot redhat dot com
- Date: Sat, 4 Sep 2004 10:59:53 +0930
- Subject: _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