From 3ef0ff1e1a9eeaad1413c87237493b9fd345c2c9 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Wed, 17 Dec 2014 16:21:05 -0600 Subject: [PATCH] mpdu: Fix invalid read The cast was being done incorrectly resulting in invalid values being obtained --- src/mpdu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mpdu.c b/src/mpdu.c index 2a9bc721..13c96156 100644 --- a/src/mpdu.c +++ b/src/mpdu.c @@ -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;