From 5ff341206eff59a3d9762664c1b4c995fca81a4f Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Tue, 19 Mar 2013 20:15:44 +0800 Subject: [PATCH] Android returns NULL for pw_crypt, set it to something else --- common-session.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common-session.c b/common-session.c index eab2ee5..f4fa579 100644 --- a/common-session.c +++ b/common-session.c @@ -462,6 +462,10 @@ void fill_passwd(const char* username) { passwd_crypt = spasswd->sp_pwdp; } #endif + if (!passwd_crypt) { + /* android supposedly returns NULL */ + passwd_crypt = "!!"; + } ses.authstate.pw_passwd = m_strdup(passwd_crypt); } }