Commit 7dd2459d authored by Zhu Yi's avatar Zhu Yi Committed by John W. Linville

ipw2x00: Write outside array bounds

> channel_index loops up to IPW_SCAN_CHANNELS, but is used after being
> incremented. This might be able to access 1 past the end of the array
Reported-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 0bf52b98
...@@ -6226,7 +6226,7 @@ static void ipw_add_scan_channels(struct ipw_priv *priv, ...@@ -6226,7 +6226,7 @@ static void ipw_add_scan_channels(struct ipw_priv *priv,
}; };
u8 channel; u8 channel;
while (channel_index < IPW_SCAN_CHANNELS) { while (channel_index < IPW_SCAN_CHANNELS - 1) {
channel = channel =
priv->speed_scan[priv->speed_scan_pos]; priv->speed_scan[priv->speed_scan_pos];
if (channel == 0) { if (channel == 0) {
......
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