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

POSIX agrees:  http://pubs.opengroup.org/onlinepubs/9699919799/functions/nl_langinfo.html clearly states "In all locales, these functions shall return a pointer to an empty string if item contains an invalid setting."
Good catch.