diff options
author | Tom Tromey <tom@tromey.com> | 2024-02-12 14:25:03 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2024-02-12 16:25:37 -0700 |
commit | 91095bcf2820f3d77ea1e16a338e686ba6a70e9f (patch) | |
tree | 41ee18a16ef5c433c58f63d686a8006b86aed6c9 /bfd/bfd.c | |
parent | e25a613437218e60854241e95e8028343a983d92 (diff) | |
download | gdb-91095bcf2820f3d77ea1e16a338e686ba6a70e9f.zip gdb-91095bcf2820f3d77ea1e16a338e686ba6a70e9f.tar.gz gdb-91095bcf2820f3d77ea1e16a338e686ba6a70e9f.tar.bz2 |
Do not call fputc from _bfd_doprnt
I noticed that _bfd_doprnt can unconditionally call fputc. However,
when called from error_handler_sprintf, this will likely result in a
crash, as the stream argument does not actually point to a FILE.
* bfd.c (_bfd_doprnt): Do not call fputc.
Diffstat (limited to 'bfd/bfd.c')
-rw-r--r-- | bfd/bfd.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1027,7 +1027,7 @@ _bfd_doprnt (print_func print, void *stream, const char *format, } else if (ptr[1] == '%') { - fputc ('%', stream); + print (stream, "%%"); result = 1; ptr += 2; } |