[dpdk-stable] patch 'app/procinfo: fix strncpy usage in args parsing' has been queued to stable release 18.02.2
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Mon Apr 30 16:03:07 CEST 2018
Hi,
FYI, your patch has been queued to stable release 18.02.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/02/18. So please
shout if anyone has objections.
Thanks.
Luca Boccassi
---
>From 943b98e5b9b82ee9bfe5ce310925dfa72d0880ed Mon Sep 17 00:00:00 2001
From: Radu Nicolau <radu.nicolau at intel.com>
Date: Tue, 20 Feb 2018 13:52:22 +0000
Subject: [PATCH] app/procinfo: fix strncpy usage in args parsing
[ upstream commit f0b9479497741040476aae5008afe84e0467e586 ]
Replace strncpy with snprintf to avoid overwriting the last
NULL character.
Coverity issue: 143252
Fixes: 2deb6b5246d7 ("app/procinfo: add collectd format and host id")
Signed-off-by: Radu Nicolau <radu.nicolau at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
app/proc_info/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/proc_info/main.c b/app/proc_info/main.c
index 2f53e3caa..f90c14498 100644
--- a/app/proc_info/main.c
+++ b/app/proc_info/main.c
@@ -159,7 +159,7 @@ proc_info_preparse_args(int argc, char **argv)
proc_info_usage(prgname);
return -1;
}
- strncpy(host_id, argv[i+1], sizeof(host_id));
+ snprintf(host_id, sizeof(host_id), "%s", argv[i+1]);
}
}
--
2.14.2
More information about the stable
mailing list