diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-02-12 19:27:01 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2012-02-12 19:27:01 +0000 |
commit | 7806d479f3371ad02cd272c73bb025aa54619fcf (patch) | |
tree | b8e9aa2e50297fe1ae72b68348f4c8f6cce945bc /package/swconfig | |
parent | 7a010ef4d19eb6cc3890ffa87235f9085f82b198 (diff) | |
download | master-187ad058-7806d479f3371ad02cd272c73bb025aa54619fcf.tar.gz master-187ad058-7806d479f3371ad02cd272c73bb025aa54619fcf.tar.bz2 master-187ad058-7806d479f3371ad02cd272c73bb025aa54619fcf.zip |
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
Diffstat (limited to 'package/swconfig')
-rw-r--r-- | package/swconfig/src/swlib.c | 2 |
1 files changed, 1 insertions, 1 deletions
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[] = { |