musl: workaround a NULL pointer dereference in dcngettext().

This commit is contained in:
Juan RP 2015-05-18 12:31:15 +02:00
parent 1e0fc306f7
commit 6c5e4d1ee2
2 changed files with 14 additions and 1 deletions

View File

@ -0,0 +1,13 @@
Fix a NULL pointer dereference in case CURRENT_LOCALE is not set up properly.
--- src/locale/dcngettext.c.orig 2015-05-18 12:29:14.897996949 +0200
+++ src/locale/dcngettext.c 2015-05-18 12:29:26.730132449 +0200
@@ -132,7 +132,7 @@ char *dcngettext(const char *domainname,
switch (category) {
case LC_MESSAGES:
locname = loc->messages_name;
- if (!*locname) goto notrans;
+ if (!locname || !*locname) goto notrans;
break;
case LC_TIME:
case LC_MONETARY:

View File

@ -1,7 +1,7 @@
# Template file for 'musl'.
pkgname=musl
version=1.1.9
revision=2
revision=3
build_style=gnu-configure
configure_args="--prefix=/usr --disable-gcc-wrapper"
conflicts="glibc>=0"