cls: fix array overrun in rtnl_ematch_opnd2txt()
Error found by coverity. Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
87682a093a
commit
8532ac5e10
1 changed files with 1 additions and 1 deletions
|
@ -692,7 +692,7 @@ static const char *operand_txt[] = {
|
|||
char *rtnl_ematch_opnd2txt(uint8_t opnd, char *buf, size_t len)
|
||||
{
|
||||
snprintf(buf, len, "%s",
|
||||
opnd <= ARRAY_SIZE(operand_txt) ? operand_txt[opnd] : "?");
|
||||
opnd < ARRAY_SIZE(operand_txt) ? operand_txt[opnd] : "?");
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue