]> git.ipfire.org Git - thirdparty/hostap.git/commit
UBSan: Avoid an unsigned integer overflow warning
authorJouni Malinen <j@w1.fi>
Sat, 23 Feb 2019 11:57:51 +0000 (13:57 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 25 Feb 2019 17:48:49 +0000 (19:48 +0200)
commit5a23c2528a5b9fc00e3282720d5828ed49f1a77b
tree17ffa99d661368f3f9202842fef6f1d1421ceaa1
parentabde4eba45ac06eeb1a344b8a9a8ab946e1de5de
UBSan: Avoid an unsigned integer overflow warning

ext_supp_rates_len would be 0 here, so decrementing it by 2 will result
in unsigned integer overflow even if that result is not actually used
anywhere. Avoid that to get rid of the UBSan warning.

tdls.c:1597:27: runtime error: unsigned integer overflow: 0 - 2 cannot be represented in type 'unsigned long'

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