From 8532ac5e10e02bd3a0d7e0bb168ba1536297137f Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 10 Jun 2014 15:29:11 +0200 Subject: [PATCH] cls: fix array overrun in rtnl_ematch_opnd2txt() Error found by coverity. Acked-by: Thomas Graf Signed-off-by: Thomas Haller --- lib/route/cls/ematch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }