diff options
Diffstat (limited to 'executor/common_linux.h')
| -rw-r--r-- | executor/common_linux.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/executor/common_linux.h b/executor/common_linux.h index 04a8c35b5..e472e7644 100644 --- a/executor/common_linux.h +++ b/executor/common_linux.h @@ -150,7 +150,8 @@ static void netlink_attr(struct nlmsg* nlmsg, int typ, struct nlattr* attr = (struct nlattr*)nlmsg->pos; attr->nla_len = sizeof(*attr) + size; attr->nla_type = typ; - memcpy(attr + 1, data, size); + if (size > 0) + memcpy(attr + 1, data, size); nlmsg->pos += NLMSG_ALIGN(attr->nla_len); } |
