From bc63786fbbe9c5ae2dd0d22f01707f0c9ef75422 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 12 Feb 2012 19:27:01 +0000 Subject: swconfig: fix off-by-one error, causing segfaults on gcc 4.6+ (fixes #9765) SVN-Revision: 30485 --- package/swconfig/src/swlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'package/swconfig') diff --git a/package/swconfig/src/swlib.c b/package/swconfig/src/swlib.c index 531a23a1ab..de08717e33 100644 --- a/package/swconfig/src/swlib.c +++ b/package/swconfig/src/swlib.c @@ -38,7 +38,7 @@ static struct nl_sock *handle; static struct nl_cache *cache; static struct genl_family *family; -static struct nlattr *tb[SWITCH_ATTR_MAX]; +static struct nlattr *tb[SWITCH_ATTR_MAX + 1]; static int refcount = 0; static struct nla_policy port_policy[] = { -- cgit v1.2.3