mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-21 22:09:23 +01:00
monitor: Don't pass NULL as src to memcpy
Skip the memcpy when len = 0
This commit is contained in:
parent
37e6f6f08b
commit
6c2b10b118
@ -176,7 +176,8 @@ static size_t rta_add(void *rta_buf, unsigned short type, uint16_t len,
|
||||
|
||||
rta->rta_len = rta_len;
|
||||
rta->rta_type = type;
|
||||
memcpy(RTA_DATA(rta), data, len);
|
||||
if (len)
|
||||
memcpy(RTA_DATA(rta), data, len);
|
||||
|
||||
return RTA_SPACE(len);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user