summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-02-12 19:27:01 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-02-12 19:27:01 +0000
commit4cf5dc60f92ac686eaa28fa8bf2d86b19ee4d505 (patch)
treeb8e9aa2e50297fe1ae72b68348f4c8f6cce945bc
parent444f3dd7f1b19aed7ff57781fc9f02ac9b501c47 (diff)
swconfig: fix off-by-one error, causing segfaults on gcc 4.6+ (fixes #9765)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30485 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/swconfig/src/swlib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/swconfig/src/swlib.c b/package/swconfig/src/swlib.c
index 531a23a1a..de08717e3 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[] = {