Heinrich Schuchardt 56e3b14703 net: don't memcpy to NULL
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@canonical.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Viacheslav Mitrofanov <v.v.mitrofanov@yadro.com>
2022-12-22 15:39:13 -05:00
..
2020-06-12 13:17:23 -04:00
2022-01-19 18:11:34 +01:00
2022-12-05 12:47:16 -05:00
2022-12-05 12:47:16 -05:00
2022-12-22 15:39:13 -05:00
2022-12-05 12:47:16 -05:00
2019-09-04 11:37:19 -05:00
2022-12-05 12:47:16 -05:00
2022-11-28 13:06:39 -05:00
2020-09-30 16:55:03 -04:00
2022-11-28 13:06:39 -05:00
2018-07-02 14:14:20 -05:00