When doing a PEAP/TTLS authentication, if the Phase2 passphrase is
not provided, connman crashes due to a NULL pointer.
This patch fixes the crash.
Associated meego bug: bz6841
---
plugins/supplicant.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/plugins/supplicant.c b/plugins/supplicant.c
index 928bacc..6bfcd45 100644
--- a/plugins/supplicant.c
+++ b/plugins/supplicant.c
@@ -1144,6 +1144,12 @@ static int set_network_peap(struct connman_network
*network,
* The Client private key file
* The Client private key file password
*/
+ if (passphrase == NULL) {
+ connman_error("Error in PEAP/TTLS authentication: "
+ "a phase2 passphrase must be defined\n");
+ return -EINVAL;
+ }
+
ca_cert = connman_network_get_string(network, "WiFi.CACertFile");
if (ca_cert == NULL) {
connman_error("Error in PEAP/TTLS authentication: "
--
1.7.0.4
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman