]> git.ipfire.org Git - thirdparty/hostap.git/commit
UBSan: Avoid integer overflow in a loop index counter
authorJouni Malinen <j@w1.fi>
Sat, 23 Feb 2019 14:28:16 +0000 (16:28 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 25 Feb 2019 17:48:49 +0000 (19:48 +0200)
commit9140caf5fbe8a035f09c83b78126169dabdb1d38
tree50df60d29aa7838cde292ff993a4f504b94269ab
parent8fc22fdde6a207a72369cc1da1aa3103368db003
UBSan: Avoid integer overflow in a loop index counter

Split the check and decrementation into separate steps to avoid an
unnecessary UBSan warning.

hostapd.c:1895:14: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'size_t' (aka 'unsigned long')

Signed-off-by: Jouni Malinen <j@w1.fi>
src/ap/hostapd.c