]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wpa_supplicant: Fix NULL dereference in eap_fast_parse_end()
authorEytan Lifshitz <eytan.lifshitz@intel.com>
Mon, 10 Feb 2014 10:55:07 +0000 (12:55 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 13 Feb 2014 13:58:21 +0000 (15:58 +0200)
In eap_fast_parse_end(), pos might be NULL if the line doesn't
contain '='.

Signed-hostap: Eytan Lifshitz <eytan.lifshitz@intel.com>

src/eap_peer/eap_fast_pac.c

index 8c480b967974df50711fce931866b580f72281f0..21d60983cd88acde9a528e69244752127bd8b5ee 100644 (file)
@@ -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 &&