summaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-05-26 09:38:56 +0200
committerDavid S. Miller <davem@davemloft.net>2010-05-26 09:38:56 +0200
commited0f160ad674407adb3aba499444f71c83289c63 (patch)
tree39cff780164f55d6cda23018431ab553c4477f9e /net/ipv4
parentbe2net: increase POST timeout for EEH recovery (diff)
downloadlinux-ed0f160ad674407adb3aba499444f71c83289c63.tar.xz
linux-ed0f160ad674407adb3aba499444f71c83289c63.zip
ipmr: off by one in __ipmr_fill_mroute()
This fixes a smatch warning: net/ipv4/ipmr.c +1917 __ipmr_fill_mroute(12) error: buffer overflow '(mrt)->vif_table' 32 <= 32 The ipv6 version had the same issue. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/ipmr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index 45889103b3e2..856123fe32f9 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -1911,7 +1911,7 @@ static int __ipmr_fill_mroute(struct mr_table *mrt, struct sk_buff *skb,
struct rtattr *mp_head;
/* If cache is unresolved, don't try to parse IIF and OIF */
- if (c->mfc_parent > MAXVIFS)
+ if (c->mfc_parent >= MAXVIFS)
return -ENOENT;
if (VIF_EXISTS(mrt, c->mfc_parent))