Skip to content

Commit

Permalink
staging: r8188eu: Fix smatch warnings for hal/rtl8188e_phycfg.c
Browse files Browse the repository at this point in the history
Smatch reports the following:
drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c:857 getTxPowerIndex88E() error: buffer overflow 'pHalData->BW20_24G_Diff' 2 <= 2
drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c:864 getTxPowerIndex88E() error: buffer overflow 'pHalData->BW20_24G_Diff' 2 <= 2

The array in question is large enough to handle RADIO_PATH_X, where X is A or B.
The lines in question refer to RADIO_PATH_C, which is defined as 2.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
lwfinger authored and gregkh committed Sep 17, 2013
1 parent 22fd8b7 commit f23e3c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/staging/rtl8188eu/include/Hal8188EPhyCfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ enum rf_radio_path {

#define MAX_PG_GROUP 13

#define RF_PATH_MAX 2
#define RF_PATH_MAX 3
#define MAX_RF_PATH RF_PATH_MAX
#define MAX_TX_COUNT 4 /* path numbers */

Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/rtl8188eu/include/odm.h
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ struct odm_dm_struct {
struct timer_list FastAntTrainingTimer;
}; /* DM_Dynamic_Mechanism_Structure */

#define ODM_RF_PATH_MAX 2
#define ODM_RF_PATH_MAX 3

enum ODM_RF_RADIO_PATH {
ODM_RF_PATH_A = 0, /* Radio Path A */
Expand Down

0 comments on commit f23e3c1

Please sign in to comment.