public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] staging: rtl8192su: initializing past the end of array
@ 2010-10-04 19:26 Dan Carpenter
  2010-10-05 18:43 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-10-04 19:26 UTC (permalink / raw)
  To: kernel-janitors

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

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/drivers/staging/rtl8192su/r8192S_rtl6052.c b/drivers/staging/rtl8192su/r8192S_rtl6052.c
index 2239809..f8a9536 100644
--- a/drivers/staging/rtl8192su/r8192S_rtl6052.c
+++ b/drivers/staging/rtl8192su/r8192S_rtl6052.c
@@ -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;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch] staging: rtl8192su: initializing past the end of array
  2010-10-04 19:26 [patch] staging: rtl8192su: initializing past the end of array Dan Carpenter
@ 2010-10-05 18:43 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2010-10-05 18:43 UTC (permalink / raw)
  To: kernel-janitors

On Mon, Oct 04, 2010 at 09:26:41PM +0200, Dan Carpenter wrote:
> We go past the end of the array when we initialize this array.
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> 
> diff --git a/drivers/staging/rtl8192su/r8192S_rtl6052.c b/drivers/staging/rtl8192su/r8192S_rtl6052.c
> index 2239809..f8a9536 100644
> --- a/drivers/staging/rtl8192su/r8192S_rtl6052.c
> +++ b/drivers/staging/rtl8192su/r8192S_rtl6052.c

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

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-10-05 18:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-04 19:26 [patch] staging: rtl8192su: initializing past the end of array Dan Carpenter
2010-10-05 18:43 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox