From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27098 invoked by alias); 8 Nov 2012 17:25:15 -0000 Received: (qmail 27054 invoked by uid 22791); 8 Nov 2012 17:25:12 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,TW_XS X-Spam-Check-By: sourceware.org Received: from mail-out.m-online.net (HELO mail-out.m-online.net) (212.18.0.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 08 Nov 2012 17:25:05 +0000 Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3XyBFr2rjtz3hhcX; Thu, 8 Nov 2012 18:25:04 +0100 (CET) X-Auth-Info: 7QP6QWrg0CBoOtynDAGCEA6HgXOfbtocqDyzc/wY6cs= Received: from igel.home (ppp-88-217-108-45.dynamic.mnet-online.de [88.217.108.45]) by mail.mnet-online.de (Postfix) with ESMTPA id 3XyBFr19ZqzbblS; Thu, 8 Nov 2012 18:25:04 +0100 (CET) Received: by igel.home (Postfix, from userid 501) id D65C3CA2A4; Thu, 8 Nov 2012 18:25:03 +0100 (CET) From: Andreas Schwab To: "Pierre Muller" Cc: Subject: Re: [RFA] ARI fixes: Remove some sprintf calls References: <4297.05661158568$1352387430@news.gmane.org> X-Yow: If I pull this SWITCH I'll be RITA HAYWORTH!! Or a SCIENTOLOGIST! Date: Thu, 08 Nov 2012 17:25:00 -0000 In-Reply-To: <4297.05661158568$1352387430@news.gmane.org> (Pierre Muller's message of "Thu, 8 Nov 2012 16:09:59 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-11/txt/msg00200.txt.bz2 "Pierre Muller" 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."