crypto/scheduler: fix build with gcc 8.2
authorJerin Jacob <jerin.jacob@caviumnetworks.com>
Sat, 3 Nov 2018 14:58:53 +0000 (14:58 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 4 Nov 2018 21:25:20 +0000 (22:25 +0100)
commite5e193acf09c9d4b08e8ed7f2bf9a61b5c204fff
treec9df8767ef81046d0265f816041b2e905eb879ab
parent11b57c69800552198218c8d9b84272f9c2d61777
crypto/scheduler: fix build with gcc 8.2

build_error:

drivers/crypto/scheduler/scheduler_pmd.c: In function ‘parse_name_arg’:
drivers/crypto/scheduler/scheduler_pmd.c:372:2: error: ‘strncpy’
specified bound 64 equals destination size [-Werror=stringop-truncation]
  strncpy(params->name, value, RTE_CRYPTODEV_NAME_MAX_LEN);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
strncpy may result a not null-terminated string,
replaced it with strlcpy

Fixes: 503e9c5afb38 ("crypto/scheduler: register as vdev driver")
Cc: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
drivers/crypto/scheduler/scheduler_pmd.c