diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2013-08-31 18:17:58 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-17 07:39:28 -0700 |
commit | df80fb632e488e4e1e62f89e5019ee0f57ffaaed (patch) | |
tree | d3aed6b7aa2e09cb172d095c19fc8e171bbaf92f /drivers/rtc/rtc-s3c.c | |
parent | 16f1eeb660bd2bfd223704ee6350706b39c55a7a (diff) | |
download | blackbird-op-linux-df80fb632e488e4e1e62f89e5019ee0f57ffaaed.tar.gz blackbird-op-linux-df80fb632e488e4e1e62f89e5019ee0f57ffaaed.zip |
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>
Diffstat (limited to 'drivers/rtc/rtc-s3c.c')
0 files changed, 0 insertions, 0 deletions