bus/pci: fix size of driver name buffer
authorAndy Green <andy@warmcat.com>
Tue, 15 May 2018 07:31:00 +0000 (15:31 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 15 May 2018 13:19:13 +0000 (15:19 +0200)
commit52f711f7b827ef5de0f6bd30066b9125d35c7ba6
tree02887d9674defc94047eaea4574d91f84f4e85b9
parentff75dd7d651e71213074a18e4a93e1ba612e84f7
bus/pci: fix size of driver name buffer

Variable dri_name is a pointer and it is incorrect to use its
size as the buffer size. Caller knows the buffer size and
it is safer to pass it explicitly.

Fixes: fe5f777b5383 ("bus/pci: replace strncpy by strlcpy")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
drivers/bus/pci/linux/pci.c