numam-dpdk/lib/librte_metrics
Remy Horton 255d42d5b6 metrics: fix potential missing string termination
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: 349950ddb9 ("metrics: add information metrics library")
Fixes: 710cab6f67 ("metrics: fix out of bound access")

Signed-off-by: Remy Horton <remy.horton@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-04-04 17:33:08 +02:00
..
Makefile lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
meson.build build: replace license text with SPDX tag 2018-01-30 21:58:59 +01:00
rte_metrics_version.map metrics: add information metrics library 2017-04-05 17:58:51 +02:00
rte_metrics.c metrics: fix potential missing string termination 2018-04-04 17:33:08 +02:00
rte_metrics.h lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00