From patchwork Wed May 24 00:20:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gustavo A. R. Silva" X-Patchwork-Id: 13253172 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 C17B0C7EE26 for ; Wed, 24 May 2023 00:19:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239014AbjEXATt (ORCPT ); Tue, 23 May 2023 20:19:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239005AbjEXATs (ORCPT ); Tue, 23 May 2023 20:19:48 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85A21B5; Tue, 23 May 2023 17:19:47 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1E5DE635F2; Wed, 24 May 2023 00:19:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BCF87C433D2; Wed, 24 May 2023 00:19:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684887586; bh=hixGdc1nHEoCc/d3qs1AQBwSDjqbYfvrtLPRskFMBvY=; h=Date:From:To:Cc:Subject:From; b=CHuGI6gMsRzy1m4Y8y1Mk4UEu2sIlb5MlVltFq4BGV+PjQyQTUzhuVUzjPUx/YRji wz9b/gjzXwwdjj4eFenbTB06urAgBpj0kU8dArGgPJDQo5K4Pe3ME0Bwz3fa8b+Nnk +YI6DyNveg9VNQjY4wCUkEOr22PwL8SfSMuaUP0Xzz05BOZVR0xse7cScT95RJdVds QjjAuDT1mEMXTeQZlmPkEaBaHOkrE1+Je5/CnIAAwx/1G0Z9AU8qPBRImCX3pua9U9 5mHDBwJzbQuVrU40bn27wwzIvR00U6B+1vXsGoQ7Nr9HSLQN9W2Slh/z8gA60K8AL1 9Vc8vsTBr8G3A== Date: Tue, 23 May 2023 18:20:38 -0600 From: "Gustavo A. R. Silva" To: Andy Walls , Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" , linux-hardening@vger.kernel.org Subject: [PATCH][next] media: pci: cx18-av-vbi: Replace one-element array with flexible-array member Message-ID: MIME-Version: 1.0 Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-hardening@vger.kernel.org One-element arrays are deprecated, and we are replacing them with flexible array members instead. So, replace one-element arrays with flexible-array members in struct vbi_anc_data. This results in no differences in binary output. Link: https://github.com/KSPP/linux/issues/79 Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook --- drivers/media/pci/cx18/cx18-av-vbi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/cx18/cx18-av-vbi.c b/drivers/media/pci/cx18/cx18-av-vbi.c index a0d465924e75..65281d40c681 100644 --- a/drivers/media/pci/cx18/cx18-av-vbi.c +++ b/drivers/media/pci/cx18/cx18-av-vbi.c @@ -51,7 +51,7 @@ struct vbi_anc_data { u8 sdid; u8 data_count; u8 idid[2]; - u8 payload[1]; /* data_count of payload */ + u8 payload[]; /* data_count of payload */ /* u8 checksum; */ /* u8 fill[]; Variable number of fill bytes */ };