mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 21:22:37 +01:00
eap-ttls: Avoid potential overflow
When checking that the length is valid, avoid potentially overflowing 'start + len'
This commit is contained in:
parent
01960ec66e
commit
22faf3482c
@ -375,7 +375,7 @@ static bool avp_iter_next(struct avp_iter *iter)
|
|||||||
|
|
||||||
len -= TTLS_AVP_HEADER_LEN;
|
len -= TTLS_AVP_HEADER_LEN;
|
||||||
|
|
||||||
if (start + len > end)
|
if (len > end - start)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (flags & TTLS_AVP_FLAG_V) {
|
if (flags & TTLS_AVP_FLAG_V) {
|
||||||
|
Loading…
Reference in New Issue
Block a user