]> git.ipfire.org Git - thirdparty/hostap.git/commit - wpa_supplicant/mbo.c
UBSan: Avoid a warning on unsigned integer overflow
authorJouni Malinen <j@w1.fi>
Mon, 25 Feb 2019 00:57:41 +0000 (02:57 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 25 Feb 2019 17:48:49 +0000 (19:48 +0200)
commit2f7bc0681632e153dd69ed651f91941b4ed3ade3
tree5945fab64165609cca885d076c3a0ff92e22b4bd
parentf3e671591e6938e27aa15ba52f258617456a8fac
UBSan: Avoid a warning on unsigned integer overflow

wpa_non_pref_chan_cmp() needs to use explicit typecasts to avoid UBSan
warnings for unsigned integer overflows.

mbo.c:298:26: runtime error: unsigned integer overflow: 1 - 2 cannot be represented in type 'unsigned int'

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/mbo.c