mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-08-20 18:57:26 +02:00
erp: Avoid potential overflow
When checking that the length is valid, avoid potentially overflowing 'start + len'
This commit is contained in:
parent
5e9178b9de
commit
938e056896
@ -131,7 +131,7 @@ static bool erp_tlv_iter_next(struct erp_tlv_iter *iter)
|
||||
else
|
||||
len = 4;
|
||||
|
||||
if (tlv + len > end)
|
||||
if (len > end - tlv)
|
||||
return false;
|
||||
|
||||
iter->tag = tag;
|
||||
|
Loading…
x
Reference in New Issue
Block a user