mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Protect from badly formed LANG variable
This commit is contained in:
parent
35cf65631c
commit
53d620a5fb
1 changed files with 2 additions and 1 deletions
|
|
@ -108,7 +108,8 @@ int type;
|
|||
if (type == NL_CAT_LOCALE)
|
||||
lang = setlocale(LC_MESSAGES, NULL);
|
||||
else {
|
||||
if ((lang = (char *) getenv("LANG")) == NULL)
|
||||
if ((lang = (char *) getenv("LANG")) == NULL ||
|
||||
strchr(lang, '/') != NULL)
|
||||
lang = "C";
|
||||
}
|
||||
if ((nlspath = (char *) getenv("NLSPATH")) == NULL
|
||||
|
|
|
|||
Loading…
Reference in a new issue