mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-17 18:34:03 -05:00
EAP-FAST: Make PAC file A_ID parser easier to analyze
Some static analyzers seem to have issues with "pos + len > end" validation (CID 62875), so convert this to "len > end - pos" to make it more obvious that len is validated against its bounds. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
364182a80f
commit
c4de71cec5
@ -714,7 +714,7 @@ static void eap_fast_pac_get_a_id(struct eap_fast_pac *pac)
|
|||||||
pos += 2;
|
pos += 2;
|
||||||
len = WPA_GET_BE16(pos);
|
len = WPA_GET_BE16(pos);
|
||||||
pos += 2;
|
pos += 2;
|
||||||
if (pos + len > end)
|
if (len > (unsigned int) (end - pos))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (type == PAC_TYPE_A_ID) {
|
if (type == PAC_TYPE_A_ID) {
|
||||||
|
Loading…
Reference in New Issue
Block a user