diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2020-08-31 15:34:09 +0300 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2020-09-22 10:12:23 +0200 |
| commit | aff59df2575f773855b00b001ebd71cb7e55942e (patch) | |
| tree | 2777456649b8f218b48de830ee985411182b49e8 /pkg/csource | |
| parent | f7907acd76a744261067bc4613efd389ce7648ed (diff) | |
executor/common_linux.h: extend netlink helpers to support zero-payload attributes (flags)
This is required for 802.11 pseudo syscalls (that will be added
later).
Diffstat (limited to 'pkg/csource')
| -rw-r--r-- | pkg/csource/generated.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/csource/generated.go b/pkg/csource/generated.go index 13d976321..5d14e7c7a 100644 --- a/pkg/csource/generated.go +++ b/pkg/csource/generated.go @@ -2381,7 +2381,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); } |
