[dpdk-stable] patch 'app/procinfo: fix strncpy usage in args parsing' has been queued to LTS release 17.11.2
Yuanhan Liu
yliu at fridaylinux.org
Sun Apr 22 17:08:55 CEST 2018
Hi,
FYI, your patch has been queued to LTS release 17.11.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 04/29/18. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 5919756e4d383f36ac491ba3cb65f7db394b9df6 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 64fbbd0f8..875d91ea3 100644
--- a/app/proc_info/main.c
+++ b/app/proc_info/main.c
@@ -188,7 +188,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.11.0
More information about the stable
mailing list