Skip to content

Commit

Permalink
swconfig: fix off-by-one error, causing segfaults on gcc 4.6+ (fixes …
Browse files Browse the repository at this point in the history
…#9765)

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30485 3c298f89-4303-0410-b956-a3cf2f4a3e73
  • Loading branch information
nbd committed Feb 12, 2012
1 parent 444f3dd commit 4cf5dc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package/swconfig/src/swlib.c
Expand Up @@ -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[] = {
Expand Down

0 comments on commit 4cf5dc6

Please sign in to comment.