[dpdk-dev] example/ip_pipeline: fix buffer size warning

Message ID 1449833351-10011-1-git-send-email-roy.fan.zhang@intel.com (mailing list archive)
State Accepted, archived
Headers

Commit Message

Fan Zhang Dec. 11, 2015, 11:29 a.m. UTC
  Coverity issue: 107102
Fixes: 7f64b9c004aa ("examples/ip_pipeline: rework config file syntax")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 examples/ip_pipeline/config_parse_tm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

John McNamara Dec. 11, 2015, 2:59 p.m. UTC | #1
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Fan Zhang
> Sent: Friday, December 11, 2015 11:29 AM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] example/ip_pipeline: fix buffer size warning
> 
> Coverity issue: 107102
> Fixes: 7f64b9c004aa ("examples/ip_pipeline: rework config file syntax")
> 
> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>

Acked-by: John McNamara <john.mcnamara@intel.com>
  
Thomas Monjalon Dec. 13, 2015, 1:34 a.m. UTC | #2
> > Coverity issue: 107102
> > Fixes: 7f64b9c004aa ("examples/ip_pipeline: rework config file syntax")
> > 
> > Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
> > Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
> 
> Acked-by: John McNamara <john.mcnamara@intel.com>

Series applied, thanks
(Not really a series but threaded like it)
  

Patch

diff --git a/examples/ip_pipeline/config_parse_tm.c b/examples/ip_pipeline/config_parse_tm.c
index cdebbdc..3932247 100644
--- a/examples/ip_pipeline/config_parse_tm.c
+++ b/examples/ip_pipeline/config_parse_tm.c
@@ -349,7 +349,7 @@  tm_cfgfile_load_sched_subport(
 					char *tokens[2] = {NULL, NULL};
 					int n_tokens;
 					int begin, end;
-					char name[CFG_NAME_LEN];
+					char name[CFG_NAME_LEN + 1];
 
 					profile = atoi(entries[j].value);
 					strncpy(name,