mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
Fix alloc validation in wpa_bss_get_bit_rates()
Need to check the value returned by os_malloc(), not the pointer to this value.
This commit is contained in:
parent
9a8d8b3db5
commit
728e776c09
@ -578,7 +578,7 @@ int wpa_bss_get_bit_rates(const struct wpa_bss *bss, u8 **rates)
|
||||
len = (ie ? ie[1] : 0) + (ie2 ? ie2[1] : 0);
|
||||
|
||||
*rates = os_malloc(len);
|
||||
if (!rates)
|
||||
if (!*rates)
|
||||
return -1;
|
||||
|
||||
for (i = 0; ie && i < ie[1]; i++)
|
||||
|
Loading…
Reference in New Issue
Block a user