From: Jouni Malinen Date: Sat, 10 Apr 2010 13:47:29 +0000 (+0300) Subject: Make wpa_compare_rsn_ie() handle missing IEs X-Git-Tag: hostap_0_7_2~74 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d3ccead325931d3adb0a754acb6adda35b877703;p=thirdparty%2Fhostap.git Make wpa_compare_rsn_ie() handle missing IEs --- diff --git a/src/common/wpa_common.c b/src/common/wpa_common.c index 84cbe9a5e..b295f3156 100644 --- a/src/common/wpa_common.c +++ b/src/common/wpa_common.c @@ -675,6 +675,9 @@ int wpa_compare_rsn_ie(int ft_initial_assoc, const u8 *ie1, size_t ie1len, const u8 *ie2, size_t ie2len) { + if (ie1 == NULL || ie2 == NULL) + return -1; + if (ie1len == ie2len && os_memcmp(ie1, ie2, ie1len) == 0) return 0; /* identical IEs */