diff --git a/src/fterm.cpp b/src/fterm.cpp index 578e16ff..871dcb0f 100644 --- a/src/fterm.cpp +++ b/src/fterm.cpp @@ -1001,10 +1001,11 @@ void FTerm::init() background_color_erase = false; x11_button_state = 0x03; - - char const* term_env = getenv("TERM"); - if ( term_env ) // Import untrusted environment variable TERM - snprintf(termtype, sizeof(termtype), "%s", getenv("TERM")); + + // Import untrusted environment variable TERM + const char* term_env = getenv("TERM"); + if ( term_env ) + snprintf(termtype, sizeof(termtype), "%s", term_env); else strncpy (termtype, const_cast("vt100"), 6);