DPDK patches and discussions
 help / color / mirror / Atom feed
From: Konstantin Ananyev <konstantin.ananyev@intel.com>
To: dev@dpdk.org
Cc: akhil.goyal@nxp.com, Konstantin Ananyev <konstantin.ananyev@intel.com>
Subject: [dpdk-dev] [PATCH 1/3] examples/ipsec-secgw: fix invalid out-of-bound check
Date: Wed, 27 Mar 2019 09:33:27 +0000	[thread overview]
Message-ID: <20190327093329.12521-2-konstantin.ananyev@intel.com> (raw)
In-Reply-To: <20190327093329.12521-1-konstantin.ananyev@intel.com>

Fixes: 7622291b641d ("examples/ipsec-secgw: allow to specify neighbour MAC address")
Coverity issue: 336791

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 examples/ipsec-secgw/ipsec-secgw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index b253eea2b..ffbd00b08 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -1439,7 +1439,7 @@ print_ethaddr(const char *name, const struct ether_addr *eth_addr)
 int
 add_dst_ethaddr(uint16_t port, const struct ether_addr *addr)
 {
-	if (port > RTE_DIM(ethaddr_tbl))
+	if (port >= RTE_DIM(ethaddr_tbl))
 		return -EINVAL;
 
 	ethaddr_tbl[port].dst = ETHADDR_TO_UINT64(addr);
-- 
2.17.1

  parent reply	other threads:[~2019-03-27  9:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-27  9:33 [dpdk-dev] [PATCH 0/3] few trivial fixes for ipsec-secgw Konstantin Ananyev
2019-03-27  9:33 ` Konstantin Ananyev
2019-03-27  9:33 ` Konstantin Ananyev [this message]
2019-03-27  9:33   ` [dpdk-dev] [PATCH 1/3] examples/ipsec-secgw: fix invalid out-of-bound check Konstantin Ananyev
2019-03-27 12:52   ` Akhil Goyal
2019-03-27 12:52     ` Akhil Goyal
2019-03-27  9:33 ` [dpdk-dev] [PATCH 2/3] examples/ipsec_secgw: fix possible NULL dereference Konstantin Ananyev
2019-03-27  9:33   ` Konstantin Ananyev
2019-03-27 12:54   ` Akhil Goyal
2019-03-27 12:54     ` Akhil Goyal
2019-03-27 13:19     ` Ananyev, Konstantin
2019-03-27 13:19       ` Ananyev, Konstantin
2019-03-27 14:37       ` Akhil Goyal
2019-03-27 14:37         ` Akhil Goyal
2019-03-27  9:33 ` [dpdk-dev] [PATCH 3/3] examples/ipsec-secgw: fix typo in test script Konstantin Ananyev
2019-03-27  9:33   ` Konstantin Ananyev
2019-03-27 12:55   ` Akhil Goyal
2019-03-27 12:55     ` Akhil Goyal
2019-03-29 14:21 ` [dpdk-dev] [PATCH 0/3] few trivial fixes for ipsec-secgw Akhil Goyal
2019-03-29 14:21   ` Akhil Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190327093329.12521-2-konstantin.ananyev@intel.com \
    --to=konstantin.ananyev@intel.com \
    --cc=akhil.goyal@nxp.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).