From 8c35f5d460baf0ee7f25669620ee234a0176681f Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Thu, 26 Apr 2012 14:35:27 +0200 Subject: [PATCH] Fixed Android null terminated password fixup in xauth-eap --- src/libcharon/plugins/xauth_eap/xauth_eap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcharon/plugins/xauth_eap/xauth_eap.c b/src/libcharon/plugins/xauth_eap/xauth_eap.c index 7ccb80205..8d7bcc0c0 100644 --- a/src/libcharon/plugins/xauth_eap/xauth_eap.c +++ b/src/libcharon/plugins/xauth_eap/xauth_eap.c @@ -217,9 +217,9 @@ METHOD(xauth_method_t, process, status_t, this->peer->destroy(this->peer); this->peer = id; } - if (pass.len && pass.ptr[pass.len - 1] == 0) + if (this->pass.len && this->pass.ptr[this->pass.len - 1] == 0) { /* fix null-terminated passwords (Android etc.) */ - pass.len -= 1; + this->pass.len -= 1; } name = lib->settings->get_str(lib->settings,