From: Andreas Schwab <schwab@linux-m68k.org>
To: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [RFA] ARI fixes: Remove some sprintf calls
Date: Thu, 08 Nov 2012 17:25:00 -0000 [thread overview]
Message-ID: <m2wqxwnh1s.fsf@igel.home> (raw)
In-Reply-To: <4297.05661158568$1352387430@news.gmane.org> (Pierre Muller's message of "Thu, 8 Nov 2012 16:09:59 +0100")
"Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr> writes:
> Index: charset.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/charset.c,v
> retrieving revision 1.50
> diff -u -p -r1.50 charset.c
> --- charset.c 17 Apr 2012 15:47:09 -0000 1.50
> +++ charset.c 8 Nov 2012 15:03:14 -0000
> @@ -531,7 +531,7 @@ convert_between_encodings (const char *f
> {
> char octal[5];
>
> - sprintf (octal, "\\%.3o", *inp & 0xff);
> + xsnprintf (octal, 5, "\\%.3o", *inp & 0xff);
sizeof(octal)?
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next parent reply other threads:[~2012-11-08 17:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4297.05661158568$1352387430@news.gmane.org>
2012-11-08 17:25 ` Andreas Schwab [this message]
2012-11-08 21:34 ` Tom Tromey
2012-11-11 23:11 ` [RFA-v2] " Pierre Muller
2012-11-12 16:08 ` Joel Brobecker
2012-11-12 16:27 ` Tom Tromey
2012-11-13 9:51 ` Pierre Muller
2012-11-13 15:46 ` Joel Brobecker
2012-11-08 15:10 [RFA] " Pierre Muller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2wqxwnh1s.fsf@igel.home \
--to=schwab@linux-m68k.org \
--cc=gdb-patches@sourceware.org \
--cc=pierre.muller@ics-cnrs.unistra.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox