examples/power: fix string overflow
authorReshma Pattan <reshma.pattan@intel.com>
Wed, 10 Apr 2019 14:54:31 +0000 (15:54 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 22 Apr 2019 22:15:10 +0000 (00:15 +0200)
commit57fad3e25fee6400af07a917e876ef8e4ee0e653
tree8a41414511bedbfb8d12cac6d3c5b0d8ce8b54a4
parent4c2caea070fb1ceb16688870d44bd4016ce5d0e4
examples/power: fix string overflow

Use strlcpy instead of strcpy to fix string overflow.

Coverity issue: 337671
Fixes: a63504a90f ("examples/power: add JSON string handling")
Cc: stable@dpdk.org
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
examples/vm_power_manager/channel_monitor.c