]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
netlink: do not memcpy 0 bytes from a NULL pointer
authorEd Maste <emaste@FreeBSD.org>
Mon, 6 Mar 2023 16:30:26 +0000 (11:30 -0500)
committerEd Maste <emaste@FreeBSD.org>
Mon, 6 Mar 2023 19:37:56 +0000 (14:37 -0500)
commitd9f07162932b3f34c9b1b2883773f580c0b04768
tree92d01ad75ebb59a2d1b10dc94e28bcd535cc2b59
parent6f68483d3f725052dba22b7c6bdebb71b482760d
netlink: do not memcpy 0 bytes from a NULL pointer

Although it works in practice it is UB, and might break after a future
compiler update.

This was rewritten in main and the memcpy call no longer exists, so this
is a direct commit to stable/13 before 055776c84a41 is MFC'd.

Discussed with: melifaro
Approved by: re (cperciva)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38927

(cherry picked from commit 305aaa93e0c805294c8bcbb5fe8b9f7caa28b349)
sys/netlink/route/iface.c