staging: r8188eu: Add files for new driver - part 14

Dan Carpenter dan.carpenter at oracle.com
Thu Aug 29 21:48:31 UTC 2013


Hello Larry Finger,

The patch 615a4d12e556: "staging: r8188eu: Add files for new driver - 
part 14" from Aug 21, 2013, leads to 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;
                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
->IndexCCK_Base[] has MAX_CHNL_GROUP_24G elements but ->IndexBW40_Base[]
has MAX_CHNL_GROUP_24G - 1 elements.  I guess this should be two loops.

  2009                          }

regards,
dan carpenter



More information about the devel mailing list