255d42d5b6
Fixes a potential memory overrun detected by Coverity. This overrun cannot currently happen in practice because rte_metrics_reg_names() explicitly forces the last name character to be a NULL terminator. This patches uses strlcpy instead of strncpy to copy name strings. Coverity issue: 143434 Fixes: 349950ddb9c5 ("metrics: add information metrics library") Fixes: 710cab6f675a ("metrics: fix out of bound access") Signed-off-by: Remy Horton <remy.horton@intel.com> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>