aboutsummaryrefslogtreecommitdiffstats
path: root/executor
diff options
context:
space:
mode:
Diffstat (limited to 'executor')
-rw-r--r--executor/common_linux.h3
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);
}