[dpdk-dev] [PATCH v4 08/18] net/nfp: don't memcpy out of source range

De Lara Guarch, Pablo pablo.de.lara.guarch at intel.com
Fri May 11 12:36:36 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 08/18] net/nfp: don't memcpy out of source
> range
> 
> /home/agreen/projects/dpdk/drivers/net/nfp/nfp_net.c:669:2:
> error: ‘memcpy’ forming offset [5, 6] is out of the bounds [0, 4] of object ‘tmp’
> with type ‘uint32_t’ {aka ‘unsigned int’} [-Werror=array-bounds]  memcpy(&hw-
> >mac_addr[0], &tmp, sizeof(struct ether_addr));
> 
> Signed-off-by: Andy Green <andy at warmcat.com>
> Acked-by: Alejandro Lucero <alejandro.lucero at netronome.com>
> Tested-by: Alejandro Lucero <alejandro.lucero at netronome.com>

Missing fixes line and CC stable.

Fixes: e6decee38209 ("net/nfp: use random MAC address if not configured")


More information about the dev mailing list