The array has NFT_CT_MAX fields, so indices must be less than that
number.
Fixes: 977b7a1dbe1bd ("ct: xml: use key names instead of numbers")
Cc: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
static const char *ctkey2str(uint32_t ctkey)
{
- if (ctkey > NFT_CT_MAX)
+ if (ctkey >= NFT_CT_MAX)
return "unknown";
return ctkey2str_array[ctkey];