[dpdk-dev] [PATCH] examples/ipsec-secgw: fix buffer not terminated issue
2016-11-04 14:16, Ferruh Yigit: > On 11/3/2016 12:12 PM, Fan Zhang wrote: > > Fixes: 0d547ed03717 ("examples/ipsec-secgw: support configuration file") > > Coverity issue: 137855 > > > > Signed-off-by: Fan Zhang > > Acked-by: Ferruh Yigit Merged with previous patch and applied
[dpdk-dev] [PATCH] examples/ipsec-secgw: fix buffer not terminated issue
On 11/3/2016 12:12 PM, Fan Zhang wrote: > Fixes: 0d547ed03717 ("examples/ipsec-secgw: support configuration file") > Coverity issue: 137855 > > Signed-off-by: Fan Zhang Acked-by: Ferruh Yigit
[dpdk-dev] [PATCH] examples/ipsec-secgw: fix buffer not terminated issue
Fixes: 0d547ed03717 ("examples/ipsec-secgw: support configuration file") Coverity issue: 137855 Signed-off-by: Fan Zhang --- 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