mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-03 18:52:47 +01:00
ie: reorder ie_parse_osen to fix uninitialized value
RSNE_ADVANCE could result in a jump to the done label where info would be copied without being initialized.
This commit is contained in:
parent
de3a267d03
commit
6b8f566498
4
src/ie.c
4
src/ie.c
@ -827,13 +827,13 @@ int ie_parse_osen(struct ie_tlv_iter *iter, struct ie_rsn_info *out_info)
|
||||
if (!is_ie_wfa_ie(iter->data, iter->len, IE_WFA_OI_OSEN))
|
||||
return -EPROTOTYPE;
|
||||
|
||||
RSNE_ADVANCE(data, len, 4);
|
||||
|
||||
memset(&info, 0, sizeof(info));
|
||||
info.group_cipher = IE_RSN_CIPHER_SUITE_NO_GROUP_TRAFFIC;
|
||||
info.pairwise_ciphers = IE_RSN_CIPHER_SUITE_CCMP;
|
||||
info.akm_suites = IE_RSN_AKM_SUITE_8021X;
|
||||
|
||||
RSNE_ADVANCE(data, len, 4);
|
||||
|
||||
if (parse_ciphers(data, len, ie_parse_osen_akm_suite, &info) < 0)
|
||||
return -EBADMSG;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user