Re: [PATCH 1/2] b43legacy: fix a lower bounds test

From
Kalle Valo <hidden>
Date
2021-10-11 06:09:58
Also in
linux-wireless
Reply to
Dan Carpenter, 2021-10-06
Dan Carpenter [off-list ref] wrote:
The problem is that "channel" is an unsigned int, when it's less 5 the
value of "channel - 5" is not a negative number as one would expect but
is very high positive value instead.

This means that "start" becomes a very high positive value.  The result
of that is that we never enter the "for (i = start; i <= end; i++) {"
loop.  Instead of storing the result from b43legacy_radio_aci_detect()
it just uses zero.

Fixes: 75388acd0cd8 ("[B43LEGACY]: add mac80211-based driver for legacy BCM43xx devices")
Signed-off-by: Dan Carpenter <redacted>
Acked-by: Michael Büsch <m@bues.ch>
2 patches applied to wireless-drivers-next.git, thanks.

c1c8380b0320 b43legacy: fix a lower bounds test
9b793db5fca4 b43: fix a lower bounds test

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20211006073542.GD8404@kili/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Thread (5 messages) 5 messages, 3 authors, last reply 2021-10-11
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help