From patchwork Fri Dec 17 01:01:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiu Jianfeng X-Patchwork-Id: 12683311 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB75BC433F5 for ; Fri, 17 Dec 2021 01:01:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231484AbhLQBBd (ORCPT ); Thu, 16 Dec 2021 20:01:33 -0500 Received: from szxga08-in.huawei.com ([45.249.212.255]:29137 "EHLO szxga08-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231487AbhLQBBc (ORCPT ); Thu, 16 Dec 2021 20:01:32 -0500 Received: from dggpeml500023.china.huawei.com (unknown [172.30.72.54]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4JFVwP0S1Nz1DJwl; Fri, 17 Dec 2021 08:58:29 +0800 (CST) Received: from ubuntu1804.huawei.com (10.67.174.58) by dggpeml500023.china.huawei.com (7.185.36.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Fri, 17 Dec 2021 09:01:30 +0800 From: Xiu Jianfeng To: , , , CC: , , Subject: [PATCH -next, v3 2/2] audit: replace zero-length array with flexible-array member Date: Fri, 17 Dec 2021 09:01:52 +0800 Message-ID: <20211217010152.61796-2-xiujianfeng@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211217010152.61796-1-xiujianfeng@huawei.com> References: <20211217010152.61796-1-xiujianfeng@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.174.58] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpeml500023.china.huawei.com (7.185.36.114) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: 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 --- 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_ */