[PATCH] bfd: rx: fix security warnings
Mike Frysinger
vapier@gentoo.org
Tue Nov 20 00:12:00 GMT 2012
make[2]: Entering directory `/usr/local/src/gnu/sourceware/build/bfd'
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -
I../../bfd -I. -I../../bfd -I../../bfd/../include -DHAVE_all_vecs -
DBINDIR='"/usr/local/bin"' -W -Wall -Wstrict-prototypes -Wmissing-prototypes
-Wshadow -Werror -g -O2 -MT elf32-rx.lo -MD -MP -MF .deps/elf32-rx.Tpo -c -o
elf32-rx.lo ../../bfd/elf32-rx.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../bfd -I. -I../../bfd -
I../../bfd/../include -DHAVE_all_vecs -DBINDIR=\"/usr/local/bin\" -W -Wall -
Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT elf32-
rx.lo -MD -MP -MF .deps/elf32-rx.Tpo -c ../../bfd/elf32-rx.c -o elf32-rx.o
../../bfd/elf32-rx.c: In function ‘rx_elf_print_private_bfd_data’:
../../bfd/elf32-rx.c:3043:3: error: format not a string literal and no format
arguments [-Werror=format-security]
cc1: all warnings being treated as errors
make[2]: *** [elf32-rx.lo] Error 1
-mike
Index: bfd/elf32-rx.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-rx.c,v
retrieving revision 1.21
diff -u -p -r1.21 elf32-rx.c
--- bfd/elf32-rx.c 9 Nov 2012 17:00:40 -0000 1.21
+++ bfd/elf32-rx.c 20 Nov 2012 00:10:47 -0000
@@ -3040,7 +3040,7 @@ rx_elf_print_private_bfd_data (bfd * abf
flags = elf_elfheader (abfd)->e_flags;
fprintf (file, _("private flags = 0x%lx:"), (long) flags);
- fprintf (file, describe_flags (flags));
+ fprintf (file, "%s", describe_flags (flags));
return TRUE;
}
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <https://sourceware.org/pipermail/binutils/attachments/20121120/47db38f8/attachment.sig>
More information about the Binutils
mailing list