[dpdk-stable] [dpdk-dev] [PATCH v4 03/18] bus/pci: replace strncpy dangerous code

De Lara Guarch, Pablo pablo.de.lara.guarch at intel.com
Fri May 11 10:17:00 CEST 2018



> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Andy Green
> Sent: Friday, May 11, 2018 2:46 AM
> To: dev at dpdk.org
> Subject: [dpdk-dev] [PATCH v4 03/18] bus/pci: replace strncpy dangerous code
> 
> In function ‘pci_get_kernel_driver_by_path’,
>     inlined from ‘pci_scan_one.isra.1’ at /home/agreen/projects/dpdk/
> 	drivers/bus/pci/linux/pci.c:317:8:
> /home/agreen/projects/dpdk/drivers/bus/pci/linux/pci.c:57:3: error:
> ‘strncpy’ specified bound depends on the length of the source argument [-
> Werror=stringop-overflow=]
>    strncpy(dri_name, name + 1, strlen(name + 1) + 1);
> 
> Signed-off-by: Andy Green <andy at warmcat.com>
> Acked-by: Pablo de Lara <pablo.de.lara.guarch at intel.com>

Forgot to say that this needs fixes lines and cc stable.

Fixes: d9a8cd9595f2 ("pci: add kernel driver type")
Cc: stable at dpdk.org




More information about the stable mailing list