aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_peer/eap_fast_pac.c
diff options
context:
space:
mode:
authorEytan Lifshitz <eytan.lifshitz@intel.com>2014-02-10 10:55:07 (GMT)
committerJouni Malinen <j@w1.fi>2014-02-13 13:58:21 (GMT)
commitc0c11afaf1467e74769acc96344255c7828415b4 (patch)
treede6573fb5eee2bbae229016ab04c1015692ed5e6 /src/eap_peer/eap_fast_pac.c
parent93a1caece06026a65bcc76fdc273f2d005f7a443 (diff)
downloadhostap-c0c11afaf1467e74769acc96344255c7828415b4.zip
hostap-c0c11afaf1467e74769acc96344255c7828415b4.tar.gz
hostap-c0c11afaf1467e74769acc96344255c7828415b4.tar.bz2
wpa_supplicant: Fix NULL dereference in eap_fast_parse_end()
In eap_fast_parse_end(), pos might be NULL if the line doesn't contain '='. Signed-hostap: Eytan Lifshitz <eytan.lifshitz@intel.com>
Diffstat (limited to 'src/eap_peer/eap_fast_pac.c')
-rw-r--r--src/eap_peer/eap_fast_pac.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/eap_peer/eap_fast_pac.c b/src/eap_peer/eap_fast_pac.c
index 8c480b9..21d6098 100644
--- a/src/eap_peer/eap_fast_pac.c
+++ b/src/eap_peer/eap_fast_pac.c
@@ -330,6 +330,8 @@ static const char * eap_fast_parse_end(struct eap_fast_pac **pac_root,
static const char * eap_fast_parse_pac_type(struct eap_fast_pac *pac,
char *pos)
{
+ if (!pos)
+ return "Cannot parse pac type";
pac->pac_type = atoi(pos);
if (pac->pac_type != PAC_TYPE_TUNNEL_PAC &&
pac->pac_type != PAC_TYPE_USER_AUTHORIZATION &&