From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14637 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Tim Tassonis Newsgroups: gmane.linux.lib.musl.general Subject: Re: printf doesn't respect locale Date: Tue, 10 Sep 2019 18:44:24 +0200 Message-ID: References: <20190909175452.GO9017@brightrain.aerifal.cx> <20190910163143.GI22009@port70.net> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="83984"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.0 To: musl@lists.openwall.com Original-X-From: musl-return-14653-gllmg-musl=m.gmane.org@lists.openwall.com Tue Sep 10 18:44:46 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1i7jG2-000LiA-ER for gllmg-musl@m.gmane.org; Tue, 10 Sep 2019 18:44:46 +0200 Original-Received: (qmail 26395 invoked by uid 550); 10 Sep 2019 16:44:36 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 26377 invoked from network); 10 Sep 2019 16:44:36 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=decentral.ch; s=rsa1; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:To:Subject; bh=40fvLveEzoHNB4Xncz0Hb/NizPqet9Crpk9xZuvWenY=; b=Zvd40KQprNSRUG2H59znGNlP+HZDCmlRkVW2AuIT10ojEbtnSbqInFSdSxDPDoRQU1VxfDO9ia5al/wUw8DGLjiHc6XloqvBJwrgG2axuvCcImUoqmNFLFngbGEAvqU/; In-Reply-To: <20190910163143.GI22009@port70.net> Content-Language: en-US Xref: news.gmane.org gmane.linux.lib.musl.general:14637 Archived-At: On 9/10/19 6:31 PM, Szabolcs Nagy wrote: > * Daniel Schoepe [2019-09-10 17:00:49 +0100]: >> I'm also not a fan of this behavior, I actually stumbled across this >> when tracking >> down a bug the different radix usage caused. > > i'm interested in how this can cause a bug in correct software. Depends on your definition of "correct software". I'd say correct software has no bugs at all... Anyway, I can think of cases where the usually correct assumption is made that the floating point delimiter is one byte, while some locales maybe need two bytes. This could then of course lead to memory corruption when using sprintf with a too small buffer. Bye Tim