summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-02-12 19:27:01 +0000
committerFelix Fietkau <nbd@openwrt.org>2012-02-12 19:27:01 +0000
commitbc63786fbbe9c5ae2dd0d22f01707f0c9ef75422 (patch)
tree5723f8d1583c30150e757353f333ddb5797a7f98 /package
parent9f551028d2568f774e4738ee584d438adf327615 (diff)
downloadmtk-20170518-bc63786fbbe9c5ae2dd0d22f01707f0c9ef75422.zip
mtk-20170518-bc63786fbbe9c5ae2dd0d22f01707f0c9ef75422.tar.gz
mtk-20170518-bc63786fbbe9c5ae2dd0d22f01707f0c9ef75422.tar.bz2
swconfig: fix off-by-one error, causing segfaults on gcc 4.6+ (fixes #9765)
SVN-Revision: 30485
Diffstat (limited to 'package')
-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 531a23a..de08717 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[] = {