Commit 03e71d6b authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

Staging: rtl8192e: printing the wrong array

Smatch complained that there is an array overflow here.  It looks
like we are supposed to be printing the ->rates_ex[] array which is
slightly larger than the ->rates[] array.  This is a cut and paste
error.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1c8103f7
...@@ -1822,7 +1822,7 @@ int rtllib_parse_info_param(struct rtllib_device *ieee, ...@@ -1822,7 +1822,7 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,
network->rates_ex[i] = info_element->data[i]; network->rates_ex[i] = info_element->data[i];
p += snprintf(p, sizeof(rates_str) - p += snprintf(p, sizeof(rates_str) -
(p - rates_str), "%02X ", (p - rates_str), "%02X ",
network->rates[i]); network->rates_ex[i]);
if (rtllib_is_ofdm_rate if (rtllib_is_ofdm_rate
(info_element->data[i])) { (info_element->data[i])) {
network->flags |= NETWORK_HAS_OFDM; network->flags |= NETWORK_HAS_OFDM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment