mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-03 19:02:34 +01:00
ap: fix off by one error
The RSN element was not being allocated properly which caused an invalid read in some cases.
This commit is contained in:
parent
ed0f3e87ca
commit
9f33740d41
2
src/ap.c
2
src/ap.c
@ -2212,7 +2212,7 @@ static bool ap_parse_new_station_ies(const void *data, uint16_t len,
|
||||
goto parse_error;
|
||||
|
||||
rsn = l_memdup(ie_tlv_iter_get_data(&iter) - 2,
|
||||
ie_tlv_iter_get_length(&iter) + 1);
|
||||
ie_tlv_iter_get_length(&iter) + 2);
|
||||
break;
|
||||
case IE_TYPE_EXTENDED_SUPPORTED_RATES:
|
||||
if (ap_parse_supported_rates(&iter, &rates) < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user