* [PATCH][next] media: pci: cx18-av-vbi: Replace one-element array with flexible-array member
@ 2023-05-24 0:20 Gustavo A. R. Silva
2023-05-26 17:43 ` Kees Cook
0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2023-05-24 0:20 UTC (permalink / raw)
To: Andy Walls, Mauro Carvalho Chehab
Cc: linux-media, linux-kernel, Gustavo A. R. Silva, linux-hardening
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(-)
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 */
};
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][next] media: pci: cx18-av-vbi: Replace one-element array with flexible-array member
2023-05-24 0:20 [PATCH][next] media: pci: cx18-av-vbi: Replace one-element array with flexible-array member Gustavo A. R. Silva
@ 2023-05-26 17:43 ` Kees Cook
0 siblings, 0 replies; 2+ messages in thread
From: Kees Cook @ 2023-05-26 17:43 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: Andy Walls, Mauro Carvalho Chehab, linux-media, linux-kernel,
linux-hardening
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>
--
Kees Cook
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-05-26 17:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-24 0:20 [PATCH][next] media: pci: cx18-av-vbi: Replace one-element array with flexible-array member Gustavo A. R. Silva
2023-05-26 17:43 ` Kees Cook
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 NNTP newsgroup(s).