Skip to content
Snippets Groups Projects
Commit 39d6cfd1 authored by deuce's avatar deuce
Browse files

NULL check before dereferencing...

parent ce3cc8c5
No related branches found
No related tags found
No related merge requests found
......@@ -446,9 +446,10 @@ int pty_connect(struct bbslist *bbs)
lang = getenv("LANG");
if (lang) {
slang = strdup(lang);
dot = strchr(slang, '.');
if (slang && dot) {
*dot = 0;
if (slang)
dot = strchr(slang, '.');
if (dot)
*dot = 0;
lang = xp_asprintf("%s.IBM437", slang);
setenv("LANG", lang, 1);
xp_asprintf_free(lang);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment