Re: [PATCH] staging: wlan-ng: replace rate macros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Apr 15, 2023 at 03:43:20PM +0300, Dan Carpenter wrote:
> Writing every sentence in imperative tense makes people sound like space
> aliens in human skin...  You can if you want to but it's not a
> requirement in staging.  There are two maintainers who have that
> requirement and the Outreachy people.

> > -	struct p80211item_uint32 basicrate1;
>                                  ^^^^^^^^^^
> This starts at 1 instead of 0.

> > +	for (int i = 0; i < 8; i++) {
>                  ^^^^^
> Now it starts at zero.
> 
> > +		if (count >= i &&
> > +		    DOT11_RATE5_ISBASIC_GET(item->supprates[i - 1])) {
>                                                             ^^^^^
> This is an array underflow.
> 
> regards,
> dan carpenter

Thank you for the heads up on the (lack of) necessity for alienspeak and
the code problem.
Starting at 0 should not have made a difference but I totally missed
that underflow... embarassing.
I'll make sure to fix that and resubmit the revised patch.

Thanks,
Luke




[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux