3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-10-05 19:08:52 +02:00

mpdu: Fix invalid read

The cast was being done incorrectly resulting in invalid values being
obtained
This commit is contained in:
Denis Kenzior 2014-12-17 16:21:05 -06:00
parent ca742bb95d
commit 3ef0ff1e1a

View File

@ -46,7 +46,7 @@ static inline bool next_2bytes(const unsigned char *mpdu, int len,
if (len < *offset + 2)
return false;
*holder = L_LE16_TO_CPU(*((uint16_t *) mpdu + *offset));
*holder = L_LE16_TO_CPU(*(uint16_t *)(mpdu + *offset));
*offset = *offset + 2;
return true;