changeset 705:2e573f39b88e

Android returns NULL for pw_crypt, set it to something else
author Matt Johnston <matt@ucc.asn.au>
date Tue, 19 Mar 2013 20:15:44 +0800
parents 523be406edc4
children 002cf09827c0
files common-session.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/common-session.c	Tue Mar 19 20:12:19 2013 +0800
+++ b/common-session.c	Tue Mar 19 20:15:44 2013 +0800
@@ -462,6 +462,10 @@
 			passwd_crypt = spasswd->sp_pwdp;
 		}
 #endif
+		if (!passwd_crypt) {
+			/* android supposedly returns NULL */
+			passwd_crypt = "!!";
+		}
 		ses.authstate.pw_passwd = m_strdup(passwd_crypt);
 	}
 }