From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/8837 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [BUG] nl_langinfo returns NULL instead of empty string Date: Tue, 10 Nov 2015 23:10:51 -0500 Message-ID: <20151111041051.GU3818@brightrain.aerifal.cx> References: <564252F1.5050307@email.cz> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1447215072 8427 80.91.229.3 (11 Nov 2015 04:11:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 11 Nov 2015 04:11:12 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-8850-gllmg-musl=m.gmane.org@lists.openwall.com Wed Nov 11 05:11:12 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1ZwMkX-0004r5-90 for gllmg-musl@m.gmane.org; Wed, 11 Nov 2015 05:11:09 +0100 Original-Received: (qmail 7895 invoked by uid 550); 11 Nov 2015 04:11:05 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 7871 invoked from network); 11 Nov 2015 04:11:04 -0000 Content-Disposition: inline In-Reply-To: <564252F1.5050307@email.cz> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:8837 Archived-At: On Tue, Nov 10, 2015 at 09:26:25PM +0100, smidjar2.reg@email.cz wrote: > Manual page for nl_langinfo() function says it should return an > empty string when 'item' is not valid. Musl's implementation > currently returns NULL. This is causing issue for applications > compiled against glibc using gnu extensions, such as 'GROUPING' > (0x10002) item (which is returning '\003\003' for glibc on my > system, but NULL when using musl). > > One example of such application is 'Champions of Regnum' game. It is > crashing with musl, because it strncpy() a string returned from the > function. Thanks! Fixed by commit a946e8117ed51dd771bd8cac3575fc28a0399a32. Rich