diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2018-07-18 09:48:45 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2018-07-18 09:48:45 +0200 |
commit | 2d6f9f4700f572f09c28994af05c32d9365bf2ad (patch) | |
tree | 7490f86feb4a45c2b365da61240b00670132e7e7 /sys/src/cmd/ssh.c | |
parent | ec5227f7f554d54c04258a17bc2bed433cccb4ab (diff) |
ssh: fix nil dereference when TERM isnt set and -r is requested
Diffstat (limited to 'sys/src/cmd/ssh.c')
-rw-r--r-- | sys/src/cmd/ssh.c | 4 |
1 files changed, 3 insertions, 1 deletions
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': |