mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-05-02 05:57:26 +02: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,6 +176,7 @@ static size_t rta_add(void *rta_buf, unsigned short type, uint16_t len,
|
|||||||
|
|
||||||
rta->rta_len = rta_len;
|
rta->rta_len = rta_len;
|
||||||
rta->rta_type = type;
|
rta->rta_type = type;
|
||||||
|
if (len)
|
||||||
memcpy(RTA_DATA(rta), data, len);
|
memcpy(RTA_DATA(rta), data, len);
|
||||||
|
|
||||||
return RTA_SPACE(len);
|
return RTA_SPACE(len);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user