swconfig: fix off-by-one error, causing segfaults on gcc 4.6+ (fixes #9765)

SVN-Revision: 30485
This commit is contained in:
Felix Fietkau 2012-02-12 19:27:01 +00:00
parent 9f551028d2
commit bc63786fbb
1 changed files with 1 additions and 1 deletions

View File

@ -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[] = {