net/i40e: fix string overflow issue

This patch fixes the coverity STRING_OVERFLOW issue.

Coverity issue: 195002
Fixes: e163c18a15 ("net/i40e: update ptype and pctype info")

Reported-by: John McNamara <john.mcnamara@intel.com>
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
This commit is contained in:
Beilei Xing 2017-10-20 10:21:19 +08:00 committed by Ferruh Yigit
parent b8f4fa4103
commit 5838a74502

View File

@ -11070,7 +11070,7 @@ i40e_update_customized_ptype(struct rte_eth_dev *dev, uint8_t *pkg,
struct rte_pmd_i40e_ptype_info *ptype;
uint32_t buff_size;
uint8_t proto_id;
char name[16];
char name[RTE_PMD_I40E_DDP_NAME_SIZE];
uint32_t i, j, n;
bool inner_ip;
int ret;