git: 9front

Download patch

ref: 9dfac9ec907869bf906efc4cb5c22acad169c771
parent: 5c7ddbf33b705268ffd13cd8a3f4136201d312b4
author: cinap_lenrek <cinap_lenrek@felloff.net>
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':
--