Skip to contentSkip to conversation

staging: rtl8192su: initializing past the end of array

PATCH In review Dan Carpenter 2 participants 2 messages Oct 4, 2010 – Oct 5, 2010

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

PATCH 1/1 staging: rtl8192su: initializing past the end of array

We go past the end of the array when we initialize this array.

drivers/staging/rtl8192su/r8192S_rtl6052.c +1 -1
index 2239809..f8a9536 100644
@@ -827,7 +827,7 @@ extern void PHY_RFShadowRefresh(struct net_device  * dev)
 
 	for (eRFPath = 0; eRFPath < RF6052_MAX_PATH; eRFPath++)
 	{
-		for (Offset = 0; Offset <= RF6052_MAX_REG; Offset++)
+		for (Offset = 0; Offset < RF6052_MAX_REG; Offset++)
 		{
 			RF_Shadow[eRFPath][Offset].Value = 0;
 			RF_Shadow[eRFPath][Offset].Compare = false;
#1 lore raw

drivers/staging/rtl8192su/r8192S_rtl6052.c

Quoted 8 lines · Dan Carpenter

We go past the end of the array when we initialize this array.

drivers/staging/rtl8192su/r8192S_rtl6052.c +0 -0
index 2239809..f8a9536 100644

This driver has now been removed from the kernel, so there's no file to patch in linux-next :)

thanks,

greg k-h