All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xiu Jianfeng <xiujianfeng@huawei.com>
To: <paul@paul-moore.com>, <eparis@redhat.com>,
	<gustavoars@kernel.org>, <keescook@chromium.org>
Cc: <linux-audit@redhat.com>, <linux-kernel@vger.kernel.org>,
	<linux-hardening@vger.kernel.org>
Subject: [PATCH -next, v3 2/2] audit: replace zero-length array with flexible-array member
Date: Fri, 17 Dec 2021 09:01:52 +0800	[thread overview]
Message-ID: <20211217010152.61796-2-xiujianfeng@huawei.com> (raw)
In-Reply-To: <20211217010152.61796-1-xiujianfeng@huawei.com>

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


WARNING: multiple messages have this Message-ID (diff)
From: Xiu Jianfeng <xiujianfeng@huawei.com>
To: <paul@paul-moore.com>, <eparis@redhat.com>,
	<gustavoars@kernel.org>, <keescook@chromium.org>
Cc: linux-audit@redhat.com, linux-kernel@vger.kernel.org,
	linux-hardening@vger.kernel.org
Subject: [PATCH -next, v3 2/2] audit: replace zero-length array with flexible-array member
Date: Fri, 17 Dec 2021 09:01:52 +0800	[thread overview]
Message-ID: <20211217010152.61796-2-xiujianfeng@huawei.com> (raw)
In-Reply-To: <20211217010152.61796-1-xiujianfeng@huawei.com>

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


  reply	other threads:[~2021-12-17  1:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-17  1:01 [PATCH -next, v3 1/2] audit: use struct_size() helper in audit_[send|make]_reply() Xiu Jianfeng
2021-12-17  1:01 ` Xiu Jianfeng
2021-12-17  1:01 ` Xiu Jianfeng [this message]
2021-12-17  1:01   ` [PATCH -next, v3 2/2] audit: replace zero-length array with flexible-array member Xiu Jianfeng
2021-12-20 21:20   ` Paul Moore
2021-12-20 21:20     ` Paul Moore
2021-12-20 19:52 ` [PATCH -next, v3 1/2] audit: use struct_size() helper in audit_[send|make]_reply() Paul Moore
2021-12-20 19:52   ` Paul Moore
  -- strict thread matches above, loose matches on Subject: below --
2021-12-16  2:08 Xiu Jianfeng
2021-12-16  2:08 ` [PATCH -next, v3 2/2] audit: replace zero-length array with flexible-array member Xiu Jianfeng

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=20211217010152.61796-2-xiujianfeng@huawei.com \
    --to=xiujianfeng@huawei.com \
    --cc=eparis@redhat.com \
    --cc=gustavoars@kernel.org \
    --cc=keescook@chromium.org \
    --cc=linux-audit@redhat.com \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul@paul-moore.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.