linux/drivers/staging/rtl8192u
Colin Ian King c751e448b7 staging: rtl8192u: Fix potential infinite loop
[ Upstream commit f9b9263a25dc3d2eaaa829e207434db6951ca7bc ]

The for-loop iterates with a u8 loop counter i and compares this
with the loop upper limit of riv->ieee80211->LinkDetectInfo.SlotNum
that is a u16 type. There is a potential infinite loop if SlotNum
is larger than the u8 loop counter. Fix this by making the loop
counter the same type as SlotNum.

Addresses-Coverity: ("Infinite loop")
Fixes: 8fc8598e61 ("Staging: Added Realtek rtl8192u driver to staging")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210407150308.496623-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-14 09:44:20 +02:00
..
ieee80211 staging: rtl8192u: Do not use GFP_KERNEL in atomic context 2020-10-29 09:57:36 +01:00
Kconfig
Makefile
authors
changes
copying
r819xU_cmdpkt.c
r819xU_cmdpkt.h
r819xU_firmware.c staging: rtl8192u: Fix indentation 2019-08-28 22:22:13 +02:00
r819xU_firmware.h
r819xU_firmware_img.c
r819xU_firmware_img.h
r819xU_phy.c
r819xU_phy.h
r819xU_phyreg.h
r8180_93cx6.c staging: rtl8192u: Add space around binary operators 2019-08-25 10:27:39 +02:00
r8180_93cx6.h
r8190_rtl8256.c staging: rtl8192u: Add or remove blank lines as required 2019-08-27 19:01:26 +02:00
r8190_rtl8256.h
r8192U.h
r8192U_core.c staging: rtl8192u: Fix potential infinite loop 2021-05-14 09:44:20 +02:00
r8192U_dm.c
r8192U_dm.h
r8192U_hw.h
r8192U_wx.c staging: rtl8192u: fix ->ssid overflow in r8192_wx_set_scan() 2021-03-17 17:03:53 +01:00
r8192U_wx.h