Skip to contentSkip to conversation

staging: r8188eu: copying one byte too much

PATCH In review Dan Carpenter 2 participants 2 messages Aug 29, 2013 – Aug 31, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: r8188eu: copying one byte too much

There is a copy and paste bug here so we copy 4 bytes instead of 3.

drivers/staging/rtl8188eu/core/rtw_wlan_util.c +1 -1
index a43fc88..013ea48 100644
@@ -1592,7 +1592,7 @@ void update_bmc_sta_support_rate(struct adapter *padapter, u32 mac_id)
 		/*  Only B, B/G, and B/G/N AP could use CCK rate */
 		memcpy((pmlmeinfo->FW_sta_info[mac_id].SupportedRates), rtw_basic_rate_cck, 4);
 	} else {
-		memcpy((pmlmeinfo->FW_sta_info[mac_id].SupportedRates), rtw_basic_rate_ofdm, 4);
+		memcpy((pmlmeinfo->FW_sta_info[mac_id].SupportedRates), rtw_basic_rate_ofdm, 3);
 	}
 }
 
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Dan Carpenter

There is a copy and paste bug here so we copy 4 bytes instead of 3.

drivers/staging/rtl8188eu/core/rtw_wlan_util.c +0 -0
index a43fc88..013ea48 100644

drivers/staging/rtl8188eu/core/rtw_wlan_util.c void update_bmc_sta_support_rate(struct adapter *padapter, u32 mac_id) · line 1597

Quoted 7 lines
drivers/staging/rtl8188eu/core/rtw_wlan_util.c +1 -1
@@ -1592,7 +1592,7 @@ void update_bmc_sta_support_rate(struct adapter *padapter, u32 mac_id)
  		/*  Only B, B/G, and B/G/N AP could use CCK rate */
  		memcpy((pmlmeinfo->FW_sta_info[mac_id].SupportedRates), rtw_basic_rate_cck, 4);
  	} else {
-		memcpy((pmlmeinfo->FW_sta_info[mac_id].SupportedRates), rtw_basic_rate_ofdm, 4);
+		memcpy((pmlmeinfo->FW_sta_info[mac_id].SupportedRates), rtw_basic_rate_ofdm, 3);
  	}
  }

Thanks,

Larry