]> git.ipfire.org Git - thirdparty/nftables.git/commit
rule: Fix for potential off-by-one in cmd_add_loc()
authorPhil Sutter <phil@nwl.cc>
Fri, 11 Jun 2021 15:08:34 +0000 (17:08 +0200)
committerPhil Sutter <phil@nwl.cc>
Mon, 14 Jun 2021 11:31:07 +0000 (13:31 +0200)
commit2d0a7a9adeb30708d6fbbee57476c0d4b9214dbd
treefdeba77a3382fe47803a5f6cebb436cf8551b673
parentc4058f96c6a55e4fcd49d4380ac07b5466ec01c0
rule: Fix for potential off-by-one in cmd_add_loc()

Using num_attrs as index means it must be at max one less than the
array's size at function start.

Fixes: 27362a5bfa433 ("rule: larger number of error locations")
Signed-off-by: Phil Sutter <phil@nwl.cc>
src/rule.c