diff options
author | Florian Westphal <fw@strlen.de> | 2009-05-21 18:07:12 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-21 18:07:12 -0400 |
commit | 5b5f792a6a9a2f9ae812d151ed621f72e99b1725 (patch) | |
tree | 5fe7c961a9f7a14cdae342311fa9a00e8155cb86 /net | |
parent | c40499e04b2005e61f989824251f9343b55f96bb (diff) |
pktgen: do not access flows[] beyond its length
typo -- pkt_dev->nflows is for stats only, the number of concurrent
flows is stored in cflows.
Reported-By: Vladimir Ivashchenko <hazard@francoudi.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/pktgen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 3779c1438c11..0666a827bc62 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
@@ -2447,7 +2447,7 @@ static inline void free_SAs(struct pktgen_dev *pkt_dev) | |||
2447 | if (pkt_dev->cflows) { | 2447 | if (pkt_dev->cflows) { |
2448 | /* let go of the SAs if we have them */ | 2448 | /* let go of the SAs if we have them */ |
2449 | int i = 0; | 2449 | int i = 0; |
2450 | for (; i < pkt_dev->nflows; i++){ | 2450 | for (; i < pkt_dev->cflows; i++) { |
2451 | struct xfrm_state *x = pkt_dev->flows[i].x; | 2451 | struct xfrm_state *x = pkt_dev->flows[i].x; |
2452 | if (x) { | 2452 | if (x) { |
2453 | xfrm_state_put(x); | 2453 | xfrm_state_put(x); |