Some code improvements
This commit is contained in:
parent
5260b87ca0
commit
5842a74a19
|
@ -1002,10 +1002,10 @@ void FTerm::init()
|
|||
background_color_erase = false;
|
||||
x11_button_state = 0x03;
|
||||
|
||||
|
||||
// Use format-string to import the untrusted environment variable
|
||||
char const* term_env = getenv("TERM");
|
||||
if ( term_env ) // Import untrusted environment variable TERM
|
||||
snprintf(termtype, sizeof(termtype), "%s", getenv("TERM"));
|
||||
if ( strnlen(termtype, sizeof(termtype)-1) == 0 )
|
||||
else
|
||||
strncpy (termtype, const_cast<char*>("vt100"), 6);
|
||||
|
||||
locale_xterm = getenv("XTERM_LOCALE");
|
||||
|
|
Loading…
Reference in New Issue