linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] ipw2x00: printing the wrong array in debug code
@ 2013-06-21 12:26 Dan Carpenter
  2013-06-22  2:45 ` Stanislav Yakovlev
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2013-06-21 12:26 UTC (permalink / raw)
  To: Stanislav Yakovlev; +Cc: John W. Linville, linux-wireless, kernel-janitors

Smatch complains that this is a read past the end of the array.  It
turns out we are printing the wrong array here.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/net/wireless/ipw2x00/libipw_rx.c b/drivers/net/wireless/ipw2x00/libipw_rx.c
index 95a1ca1..9ffe659 100644
--- a/drivers/net/wireless/ipw2x00/libipw_rx.c
+++ b/drivers/net/wireless/ipw2x00/libipw_rx.c
@@ -1195,7 +1195,7 @@ static int libipw_parse_info_param(struct libipw_info_element
 #ifdef CONFIG_LIBIPW_DEBUG
 				p += snprintf(p, sizeof(rates_str) -
 					      (p - rates_str), "%02X ",
-					      network->rates[i]);
+					      network->rates_ex[i]);
 #endif
 				if (libipw_is_ofdm_rate
 				    (info_element->data[i])) {

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

* Re: [patch] ipw2x00: printing the wrong array in debug code
  2013-06-21 12:26 [patch] ipw2x00: printing the wrong array in debug code Dan Carpenter
@ 2013-06-22  2:45 ` Stanislav Yakovlev
  0 siblings, 0 replies; 2+ messages in thread
From: Stanislav Yakovlev @ 2013-06-22  2:45 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: John W. Linville, linux-wireless, kernel-janitors

Hi Dan,

On 21 June 2013 05:26, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> Smatch complains that this is a read past the end of the array.  It
> turns out we are printing the wrong array here.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>

Looks fine, thanks.

Stanislav.

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

end of thread, other threads:[~2013-06-22  2:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-21 12:26 [patch] ipw2x00: printing the wrong array in debug code Dan Carpenter
2013-06-22  2:45 ` Stanislav Yakovlev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).