summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2014-06-10 13:29:11 (GMT)
committerThomas Haller <thaller@redhat.com>2014-06-10 19:45:52 (GMT)
commit8532ac5e10e02bd3a0d7e0bb168ba1536297137f (patch)
treebec5fcc803d7831b4bfa9f6a1d85767039b4ad8c
parent87682a093a64788a848c13ca77c8e626dd4b2b03 (diff)
downloadlibnl-8532ac5e10e02bd3a0d7e0bb168ba1536297137f.zip
libnl-8532ac5e10e02bd3a0d7e0bb168ba1536297137f.tar.gz
libnl-8532ac5e10e02bd3a0d7e0bb168ba1536297137f.tar.bz2
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>
-rw-r--r--lib/route/cls/ematch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/route/cls/ematch.c b/lib/route/cls/ematch.c
index ab30324..6cbe274 100644
--- a/lib/route/cls/ematch.c
+++ b/lib/route/cls/ematch.c
@@ -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;
}