DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] examples/ipsec-secgw: fix buffer not null terminated
@ 2016-11-03 12:12 Fan Zhang
  2016-11-03 12:12 ` [dpdk-dev] [PATCH] examples/ipsec-secgw: fix buffer not terminated issue Fan Zhang
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Fan Zhang @ 2016-11-03 12:12 UTC (permalink / raw)
  To: dev

Fixes: 0d547ed03717 ("examples/ipsec-secgw: support configuration file")
Coverity issue: 137854

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..e09a7c0 100644
--- a/examples/ipsec-secgw/parser.c
+++ b/examples/ipsec-secgw/parser.c
@@ -248,7 +248,7 @@ parse_ipv4_addr(const char *token, struct in_addr *ipv4, 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

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2016-11-07 20:48 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-03 12:12 [dpdk-dev] [PATCH] examples/ipsec-secgw: fix buffer not null terminated Fan Zhang
2016-11-03 12:12 ` [dpdk-dev] [PATCH] examples/ipsec-secgw: fix buffer not terminated issue Fan Zhang
2016-11-04 14:16   ` 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

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).