3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 13:02:44 +01:00

eap-ttls: Avoid potential overflow

When checking that the length is valid, avoid potentially overflowing
'start + len'
This commit is contained in:
Denis Kenzior 2022-01-14 08:57:27 -06:00
parent 01960ec66e
commit 22faf3482c

View File

@ -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) {