if setlocale has not been called, the current locale's messages_name
may be a null pointer. the code path where it's assumed to be non-null
was only reachable if bindtextdomain had already been called, which is
normally not done in programs which do not call setlocale, so the
omitted check went unnoticed.
patch from Void Linux, with description rewritten.
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: