Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 10 Nov 2015 20:42:40 +0000
From: Josiah Worcester <>
Subject: Re: [BUG] nl_langinfo returns NULL instead of empty string

On Tue, Nov 10, 2015 at 12:26 PM <> 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.

POSIX agrees:
states "In all locales, these functions shall return a pointer to an empty
string if item contains an invalid setting."
Good catch.

Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.