ref: 2d6f9f4700f572f09c28994af05c32d9365bf2ad
parent: ec5227f7f554d54c04258a17bc2bed433cccb4ab
author: cinap_lenrek <[email protected]>
date: Wed Jul 18 05:48:45 EDT 2018
ssh: fix nil dereference when TERM isnt set and -r is requested
--- a/sys/src/cmd/ssh.c
+++ b/sys/src/cmd/ssh.c
@@ -1151,7 +1151,9 @@
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':