From: Fan Zhang <roy.fan.zhang@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] examples/ipsec-secgw: fix buffer not terminated issue
Date: Thu, 3 Nov 2016 12:12:41 +0000 [thread overview]
Message-ID: <1478175163-229116-2-git-send-email-roy.fan.zhang@intel.com> (raw)
In-Reply-To: <1478175163-229116-1-git-send-email-roy.fan.zhang@intel.com>
Fixes: 0d547ed03717 ("examples/ipsec-secgw: support configuration file")
Coverity issue: 137855
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
---
examples/ipsec-secgw/parser.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/ipsec-secgw/parser.c b/examples/ipsec-secgw/parser.c
index 99bdfc5..ede08d8 100644
--- a/examples/ipsec-secgw/parser.c
+++ b/examples/ipsec-secgw/parser.c
@@ -277,7 +277,7 @@ parse_ipv6_addr(const char *token, struct in6_addr *ipv6, uint32_t *mask)
if (mask)
*mask = atoi(pch);
} else {
- strncpy(ip_str, token, sizeof(ip_str));
+ strncpy(ip_str, token, sizeof(ip_str) - 1);
if (mask)
*mask = 0;
}
--
2.5.5
next prev parent reply other threads:[~2016-11-03 12:12 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-03 12:12 [dpdk-dev] [PATCH] examples/ipsec-secgw: fix buffer not null terminated Fan Zhang
2016-11-03 12:12 ` Fan Zhang [this message]
2016-11-04 14:16 ` [dpdk-dev] [PATCH] examples/ipsec-secgw: fix buffer not terminated issue Ferruh Yigit
2016-11-06 23:38 ` Thomas Monjalon
2016-11-03 12:12 ` [dpdk-dev] [PATCH] examples/ipsec-secgw: fix copy into fixed size buffer issue Fan Zhang
2016-11-04 14:15 ` Ferruh Yigit
2016-11-07 14:21 ` [dpdk-dev] [PATCH v2] " Fan Zhang
2016-11-07 15:59 ` Ferruh Yigit
2016-11-07 20:40 ` Thomas Monjalon
2016-11-03 12:12 ` [dpdk-dev] [PATCH] examples/ipsec-secgw: fix pointer to local outside scope Fan Zhang
2016-11-04 14:15 ` Ferruh Yigit
2016-11-07 14:22 ` [dpdk-dev] [PATCH v2] " Fan Zhang
2016-11-07 17:25 ` [dpdk-dev] [PATCH v3] " Fan Zhang
2016-11-07 17:31 ` Ferruh Yigit
2016-11-07 20:48 ` Thomas Monjalon
2016-11-04 14:18 ` [dpdk-dev] [PATCH] examples/ipsec-secgw: fix buffer not null terminated Ferruh Yigit
2016-11-06 23:38 ` Thomas Monjalon
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=1478175163-229116-2-git-send-email-roy.fan.zhang@intel.com \
--to=roy.fan.zhang@intel.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).