Linux-audit Archive mirror
 help / color / mirror / Atom feed
From: Paul Moore <paul@paul-moore.com>
To: Xiu Jianfeng <xiujianfeng@huawei.com>, linux-audit@redhat.com
Cc: linux-hardening@vger.kernel.org
Subject: Fwd: [PATCH -next, v3 2/2] audit: replace zero-length array with flexible-array member
Date: Thu, 16 Dec 2021 18:16:02 -0500	[thread overview]
Message-ID: <CAHC9VhRsSydnMg3uYf9bjXtmP+zydTHxTJzNYygBREpN0s4Lmw@mail.gmail.com> (raw)
In-Reply-To: <20211216020831.93674-2-xiujianfeng@huawei.com>

Forwarding this to the linux-audit mailing list.

---------- Forwarded message ---------
From: Xiu Jianfeng <xiujianfeng@huawei.com>
Date: Wed, Dec 15, 2021 at 9:08 PM
Subject: [PATCH -next, v3 2/2] audit: replace zero-length array with
flexible-array member
To: <paul@paul-moore.com>, <eparis@redhat.com>,
<keescook@chromium.org>, <gustavoars@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-hardening@vger.kernel.org>


Zero-length arrays are deprecated and should be replaced with
flexible-array members.

Link: https://github.com/KSPP/linux/issues/78
Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
---
 include/uapi/linux/audit.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h
index 9176a095fefc..8eda133ca4c1 100644
--- a/include/uapi/linux/audit.h
+++ b/include/uapi/linux/audit.h
@@ -514,7 +514,7 @@ struct audit_rule_data {
        __u32           values[AUDIT_MAX_FIELDS];
        __u32           fieldflags[AUDIT_MAX_FIELDS];
        __u32           buflen; /* total length of string fields */
-       char            buf[0]; /* string fields buffer */
+       char            buf[];  /* string fields buffer */
 };

 #endif /* _UAPI_LINUX_AUDIT_H_ */
--
2.17.1

--
Linux-audit mailing list
Linux-audit@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-audit


      parent reply	other threads:[~2021-12-16 23:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20211216020831.93674-1-xiujianfeng@huawei.com>
2021-12-16 23:14 ` Fwd: [PATCH -next, v3 1/2] audit: use struct_size() helper in audit_[send|make]_reply() Paul Moore
     [not found] ` <20211216020831.93674-2-xiujianfeng@huawei.com>
2021-12-16 23:16   ` Paul Moore [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHC9VhRsSydnMg3uYf9bjXtmP+zydTHxTJzNYygBREpN0s4Lmw@mail.gmail.com \
    --to=paul@paul-moore.com \
    --cc=linux-audit@redhat.com \
    --cc=linux-hardening@vger.kernel.org \
    --cc=xiujianfeng@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).