Re: linux-4.12-rc1/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c:2966: cart before the horse ?

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

 



On Sun, May 14, 2017 at 07:19:50PM +0000, David Binderman wrote:
> Hello there,
> 
> linux-4.12-rc1/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c:2966]: (style) Array index 'i' is used before limits check.
> 
> Source code is
> 
>                 while (szLine[i] != '{' && i < strlen(szLine))
>                     i++;
> 

It wouldn't surprise me if this function was buggy somehow but that's a
false positive. i == strlen() is still within bounds because strlen()
returns the number of characters not counting the NUL terminator.

regards,
dan carpenter


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [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