diff options
author | Fabien Marotte <fabienx.marotte@linux.intel.com> | 2010-09-16 09:52:43 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2010-09-16 12:52:08 +0200 |
commit | b36ad87dd441b253d1756936660fa728425ac113 (patch) | |
tree | 3a7cd3a96bdfe07ec29a9f1f60d37e45f31087d7 /plugins | |
parent | 19e15a5dff2fc847edd45232ac0102b76ffeccf6 (diff) | |
download | connman-b36ad87dd441b253d1756936660fa728425ac113.tar.gz connman-b36ad87dd441b253d1756936660fa728425ac113.tar.bz2 connman-b36ad87dd441b253d1756936660fa728425ac113.zip |
Fix a crash when doing PEAP/TTLS authentication
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.
Fixes BMC #6841
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/supplicant.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/supplicant.c b/plugins/supplicant.c index 928bacc4..6bfcd458 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: " |