[next] media: pci: cx18-av-vbi: Replace one-element array with flexible-array member
Message ID | ZG1YVji9thTLWeRm@work |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2505816vqo; Tue, 23 May 2023 17:31:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ53LN6A+Tl4Co7nTOhsW0YdDWkWTZP8Dk553IVd96oFggQ4jMY6GwUzpymwdNaXBLwikQvf X-Received: by 2002:a17:90b:2292:b0:253:83d8:e487 with SMTP id kx18-20020a17090b229200b0025383d8e487mr14063433pjb.0.1684888269755; Tue, 23 May 2023 17:31:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684888269; cv=none; d=google.com; s=arc-20160816; b=x4PM7RJLn6nCH0lRjAVn/Vh2cjkGnl4zV/b7j7vAt/fIHFd0N1MuI0KGqU2cDyxD34 76sXRSYV27DXKBsoNhQol5bBAzezNtIQIPZEED0yVR89xkt1Op3cbRYatJDLggCIwJ2i Tbnz7v4B760LQtsMSOrSuDw3fKmgM+1B56Yo5BYt9hZsRkg/R+PPbQKGtxkzqHbYZmD1 v0lhTucKp1zqf6aq8t6rvVwTrLhfruSBYxDhxUkdDUSUQMeAOF1fggwNKYPRjujQoKoS DnzyNEqGSpZcplaj6mdSDH8MrH3x3dPqvKzjHPne7gLXRSpt1y3bWxHrNmsX+BiGfcVf VALA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=wCzpzVo37mdBdHb2CEZdnK4HUmvZVaBpAIxzf3UqBDA=; b=foPCpgBUHaLAfLC7YI/5f8+B8JJGY+kqMH7eXWLyfWC0GnjgoPDDX9kSvp59SRAq+U KkM1+/Z1WRkKGkEEqEiLmCiZUYgishQCBbZnAHDQ0IB05Vv6VWP/L4+gnXOm1BfGmXHl YMntN/hFdCbR3X3mgyKyk6hucFsrN7GHSDsX0mv5uRdXt50iWfQdiDrm0VEqKC0eiJUd 7o1Jrt6yImzzeHEPeMtYW2c3xuQu0p3gtrFzsByWrrezq2z7bK190emLLV2bZj6qvwOf hHRJfxOc2JpIgHcAMaR2SdstK+S0yXhbJHUS5pmMOpQth86u6g8aCUQSSLW8nADLV08H NXVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CHuGI6gM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bb2-20020a17090b008200b00255dc7f7586si40176pjb.138.2023.05.23.17.30.56; Tue, 23 May 2023 17:31:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CHuGI6gM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239020AbjEXATt (ORCPT <rfc822;ahmedalshaiji.dev@gmail.com> + 99 others); 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 <rfc822;linux-kernel@vger.kernel.org>); 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" <gustavoars@kernel.org> To: Andy Walls <awalls@md.metrocast.net>, Mauro Carvalho Chehab <mchehab@kernel.org> Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" <gustavoars@kernel.org>, linux-hardening@vger.kernel.org Subject: [PATCH][next] media: pci: cx18-av-vbi: Replace one-element array with flexible-array member Message-ID: <ZG1YVji9thTLWeRm@work> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766733402146963982?= X-GMAIL-MSGID: =?utf-8?q?1766733402146963982?= |
Series |
[next] media: pci: cx18-av-vbi: Replace one-element array with flexible-array member
|
|
Commit Message
Gustavo A. R. Silva
May 24, 2023, 12:20 a.m. UTC
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 <gustavoars@kernel.org>
---
drivers/media/pci/cx18/cx18-av-vbi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Tue, May 23, 2023 at 06:20:38PM -0600, Gustavo A. R. Silva wrote: > 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 <gustavoars@kernel.org> Reviewed-by: Kees Cook <keescook@chromium.org>
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 */ };