Re: [iproute PATCH 21/51] lib/libnetlink: Don't pass NULL parameter to memcpy()

2017-08-18 Thread Lance Richardson
> From: "Phil Sutter" > To: "Stephen Hemminger" > Cc: netdev@vger.kernel.org > Sent: Tuesday, August 15, 2017 12:42:55 PM > Subject: Re: [iproute PATCH 21/51] lib/libnetlink: Don't pass NULL parameter > to memcpy() > > On Tue, Aug 15, 2017 at

Re: [iproute PATCH 21/51] lib/libnetlink: Don't pass NULL parameter to memcpy()

2017-08-15 Thread Phil Sutter
On Tue, Aug 15, 2017 at 08:15:55AM -0700, Stephen Hemminger wrote: > On Sat, 12 Aug 2017 14:04:40 +0200 > Phil Sutter wrote: > > > Both addattr_l() and rta_addattr_l() may be called with NULL data > > pointer and 0 alen parameters. Avoid calling memcpy() in that case. > > > > Signed-off-by: Phil

Re: [iproute PATCH 21/51] lib/libnetlink: Don't pass NULL parameter to memcpy()

2017-08-15 Thread Stephen Hemminger
On Sat, 12 Aug 2017 14:04:40 +0200 Phil Sutter wrote: > Both addattr_l() and rta_addattr_l() may be called with NULL data > pointer and 0 alen parameters. Avoid calling memcpy() in that case. > > Signed-off-by: Phil Sutter What are you fixing. memcpy(dest, NULL, 0) should be harmless NOP

[iproute PATCH 21/51] lib/libnetlink: Don't pass NULL parameter to memcpy()

2017-08-12 Thread Phil Sutter
Both addattr_l() and rta_addattr_l() may be called with NULL data pointer and 0 alen parameters. Avoid calling memcpy() in that case. Signed-off-by: Phil Sutter --- lib/libnetlink.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/libnetlink.c b/lib/libnetlink.c inde