]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/tcp_highspeed.c
[TCP]: tcp_highspeed: fix AIMD table out-of-bounds access
[linux-2.6-omap-h63xx.git] / net / ipv4 / tcp_highspeed.c
index 63cf7e54084791c54d5def202ef124ae70eee770..e0e9d1383c7c7e894a1019c3e2ce28785aea5dc4 100644 (file)
@@ -125,7 +125,7 @@ static void hstcp_cong_avoid(struct sock *sk, u32 adk, u32 rtt,
                /* Update AIMD parameters */
                if (tp->snd_cwnd > hstcp_aimd_vals[ca->ai].cwnd) {
                        while (tp->snd_cwnd > hstcp_aimd_vals[ca->ai].cwnd &&
-                              ca->ai < HSTCP_AIMD_MAX)
+                              ca->ai < HSTCP_AIMD_MAX - 1)
                                ca->ai++;
                } else if (tp->snd_cwnd < hstcp_aimd_vals[ca->ai].cwnd) {
                        while (tp->snd_cwnd > hstcp_aimd_vals[ca->ai].cwnd &&