The addition operator is of higher precedence than the ternary
conditional and the construction here needs to use parentheses to
calculate the buffer length properly when generating test frames with
BIP protection.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
struct ieee80211_hdr *hdr;
size_t plen;
- plen = len + igtk_len == 32 ? 26 : 18;
+ plen = len + (igtk_len == 32 ? 26 : 18);
prot = os_malloc(plen);
if (prot == NULL)
return NULL;