Re: [PATCH 3/4] bus/pci/bsd: Eliminate potential overflow

2025-05-08 Thread Burakov, Anatoly
On 5/6/2025 7:40 PM, Jake Freeland wrote: When calling rte_pci_write_config(), use memcpy(3) to copy @len bytes of @buf into local memory instead of casting it to a uint32_t pointer and dereferencing it. This prevents us from reading data outside of @buf in the case that @buf has a length less th

[PATCH 3/4] bus/pci/bsd: Eliminate potential overflow

2025-05-06 Thread Jake Freeland
When calling rte_pci_write_config(), use memcpy(3) to copy @len bytes of @buf into local memory instead of casting it to a uint32_t pointer and dereferencing it. This prevents us from reading data outside of @buf in the case that @buf has a length less than 32 bits. Signed-off-by: Jake Freeland -