[PATCH 1/1] net: don't memcpy to NULL
Bin Meng
bmeng.cn at gmail.com
Wed Dec 7 12:03:32 CET 2022
On Wed, Dec 7, 2022 at 6:53 PM Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
>
> In ndisc_receive() 7 bytes are copied from a buffer of size 6 to NULL.
>
> net_nd_packet_mac is a pointer. If it is NULL, we should set it to the
> address of the buffer with the MAC address.
>
> Addresses-Coverity-ID: 430974 ("Out-of-bounds access")
> Fixes: c6610e1d90ea ("net: ipv6: Add Neighbor Discovery Protocol (NDP)")
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> ---
> net/ndisc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
More information about the U-Boot
mailing list