mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-18 02:44:03 -05:00
EAP-TTLS: Avoid ubsan warning on 0x80<<24 not fitting in int
Use a typecast to make this unsigned so that the MSB fits within the range of allowed values. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
0f5fb8a467
commit
e9ed7d9898
@ -175,7 +175,8 @@ static u8 * eap_ttls_avp_hdr(u8 *avphdr, u32 avp_code, u32 vendor_id,
|
||||
}
|
||||
|
||||
avp->avp_code = host_to_be32(avp_code);
|
||||
avp->avp_length = host_to_be32((flags << 24) | (u32) (hdrlen + len));
|
||||
avp->avp_length = host_to_be32(((u32) flags << 24) |
|
||||
(u32) (hdrlen + len));
|
||||
|
||||
return avphdr + hdrlen;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user