ipw2x00: printing the wrong array in debug code
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 21 Jun 2013 12:26:20 +0000 (15:26 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 24 Jun 2013 18:44:25 +0000 (14:44 -0400)
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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ipw2x00/libipw_rx.c

index 95a1ca1..9ffe659 100644 (file)
@@ -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])) {