From 2d6f9f4700f572f09c28994af05c32d9365bf2ad Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Wed, 18 Jul 2018 09:48:45 +0200 Subject: ssh: fix nil dereference when TERM isnt set and -r is requested --- sys/src/cmd/ssh.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/src/cmd/ssh.c b/sys/src/cmd/ssh.c index 7aa8d1bd8..51514aa80 100644 --- a/sys/src/cmd/ssh.c +++ b/sys/src/cmd/ssh.c @@ -1151,7 +1151,9 @@ main(int argc, char *argv[]) fmtinstall('k', kfmt); tty.term = getenv("TERM"); - raw = tty.term != nil && *tty.term != 0; + if(tty.term == nil) + tty.term = ""; + raw = *tty.term != 0; ARGBEGIN { case 'd': -- cgit v1.2.3