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
1 changed files with 1 additions and 1 deletions

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;