[dpdk-dev] [PATCH] bus/fpga: use strlcpy instead of strncpy

Thomas Monjalon thomas at monjalon.net
Sun May 13 12:07:13 CEST 2018


12/05/2018 09:02, Pablo de Lara:
> Gcc 8 reports a build error:
> 
> drivers/bus/ifpga/ifpga_bus.c:161:2: error: ‘strncpy’ specified
> bound 256 equals destination size [-Werror=stringop-truncation]
>   strncpy(afu_pr_conf.bs_path, path, sizeof(afu_pr_conf.bs_path));
>   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Fixes: 05fa3d4a6539 ("bus/ifpga: add Intel FPGA bus library")
> 
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch at intel.com>

Applied, thanks





More information about the dev mailing list