ssh: fix nil dereference when TERM isnt set and -r is requested

This commit is contained in:
cinap_lenrek 2018-07-18 09:48:45 +02:00
parent ec5227f7f5
commit 2d6f9f4700

View file

@ -1151,7 +1151,9 @@ main(int argc, char *argv[])
fmtinstall('k', kfmt); fmtinstall('k', kfmt);
tty.term = getenv("TERM"); tty.term = getenv("TERM");
raw = tty.term != nil && *tty.term != 0; if(tty.term == nil)
tty.term = "";
raw = *tty.term != 0;
ARGBEGIN { ARGBEGIN {
case 'd': case 'd':