[dpdk-dev] [PATCH 1/2] bus/dpaa: fix build with gcc 9.0

Shreyansh Jain shreyansh.jain at nxp.com
Thu Nov 1 13:49:27 CET 2018


On Thursday 01 November 2018 06:49 PM, Ferruh Yigit wrote:
> build error:
> In function ‘fman_if_init’,
>      .../drivers/bus/dpaa/base/fman/fman.c:186:2:
>      error: ‘strncpy’ output may be truncated copying 4095 bytes from a
>             string of length 4095 [-Werror=stringop-truncation]
>      strncpy(__if->node_path, dpa_node->full_name, PATH_MAX - 1);
> 
> strncpy may result a not null-terminated string,
> replaced it with rte_strscpy
> 
> Fixes: 5b22cf744689 ("bus/dpaa: introducing FMan configurations")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
> ---

I don't have gcc 9.0 environment to verify this, but the fix looks 
reasonable to me:

Acked-by: Shreyansh Jain <shreyansh.jain at nxp.com>


More information about the dev mailing list