app/testpmd: fix copy of dynamic flag name
authorOri Kam <orika@mellanox.com>
Tue, 4 Feb 2020 13:39:46 +0000 (13:39 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 5 Feb 2020 08:51:21 +0000 (09:51 +0100)
commitbd164530ecb04c1a7e9c7680f9e9ab374bbe0a75
tree6ad37a106acfed2ec606f9b72449a94b133b0a0c
parent19d4c1aee898d5db13f8a73f681efa035cf7764f
app/testpmd: fix copy of dynamic flag name

When working with testpmd and setting the dynflag name, we copy the
name given by the cmd to the dynflag name.

The issue is that the size of the dynflag name is smaller then the
string used by testpmd.

This commit solves this issue by checking that the length of the requested
flag name is not too long.

Coverity issue: 353610
Fixes: b57b66a97ebf ("app/testpmd: support mbuf dynamic flag")

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
app/test-pmd/cmdline.c