2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-24 13:13:57 +08:00
linux-next/drivers/staging/rtl8188eu
Larry Finger df80fb632e staging: r8188eu: Fix Smatch off-by-one warning in hal/rtl8188e_hal_init.c
Smatch reports the following warning:
"drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c:2008
Hal_ReadPowerValueFromPROM_8188E()
	 error: buffer overflow 'pwrInfo24G->IndexBW40_Base[rfPath]' 5 <= 5"

drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
  2005                          /* 2.4G default value */
  2006                          for (group = 0; group < MAX_CHNL_GROUP_24G; group++) {
  2007                                  pwrInfo24G->IndexCCK_Base[rfPath][group] =      EEPROM_DEFAULT_24G_INDEX;
  2008                                  pwrInfo24G->IndexBW40_Base[rfPath][group] =     EEPROM_DEFAULT_24G_INDEX;

The reason is that IndexCCK_Base[] has MAX_CHNL_GROUP_24G elements, but
IndexBW40_Base is smaller by 1. Make them both have MAX_CHNL_GROUP_24G
elements.

Reported by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17 07:39:28 -07:00
..
core staging: r8188eu: Fix uninitialized variable change_inx 2013-09-17 07:39:27 -07:00
hal staging: r8188eu: Fix build errors for allyesconfig 2013-08-25 10:21:01 -07:00
include staging: r8188eu: Fix Smatch off-by-one warning in hal/rtl8188e_hal_init.c 2013-09-17 07:39:28 -07:00
os_dep staging: rtl8188eu: Remove duplicate header inclusion in ioctl_linux.c 2013-08-28 15:17:35 -07:00
Kconfig staging: r8188eu: Insert Kconfig files for new driver 2013-08-22 10:20:31 -07:00
Makefile staging: r8188eu: Turn on build of new driver 2013-08-22 10:20:31 -07:00
TODO staging: r8188eu: Turn on build of new driver 2013-08-22 10:20:31 -07:00