* [PATCH] sctp: Replace zero-length array with flexible array member
@ 2024-11-16 16:28 Thorsten Blum
2024-11-17 5:06 ` Kees Cook
0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2024-11-16 16:28 UTC (permalink / raw)
To: Marcelo Ricardo Leitner, Xin Long
Cc: linux-hardening, Thorsten Blum, linux-sctp, linux-kernel
Replace the deprecated zero-length array with a modern flexible array
member in the struct sctp_idatahdr.
Link: https://github.com/KSPP/linux/issues/78
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
include/linux/sctp.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/sctp.h b/include/linux/sctp.h
index 836a7e200f39..19eaaf3948ed 100644
--- a/include/linux/sctp.h
+++ b/include/linux/sctp.h
@@ -239,7 +239,7 @@ struct sctp_idatahdr {
__u32 ppid;
__be32 fsn;
};
- __u8 payload[0];
+ __u8 payload[];
};
struct sctp_idata_chunk {
--
2.47.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] sctp: Replace zero-length array with flexible array member
2024-11-16 16:28 [PATCH] sctp: Replace zero-length array with flexible array member Thorsten Blum
@ 2024-11-17 5:06 ` Kees Cook
0 siblings, 0 replies; 2+ messages in thread
From: Kees Cook @ 2024-11-17 5:06 UTC (permalink / raw)
To: Thorsten Blum
Cc: Marcelo Ricardo Leitner, Xin Long, linux-hardening, linux-sctp,
linux-kernel
On Sat, Nov 16, 2024 at 05:28:24PM +0100, Thorsten Blum wrote:
> Replace the deprecated zero-length array with a modern flexible array
> member in the struct sctp_idatahdr.
>
> Link: https://github.com/KSPP/linux/issues/78
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Nothing actually uses "payload" so it could probably just be entirely
removed, but yes, this looks like a no-op change.
Reviewed-by: Kees Cook <kees@kernel.org>
--
Kees Cook
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-11-17 5:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-16 16:28 [PATCH] sctp: Replace zero-length array with flexible array member Thorsten Blum
2024-11-17 5:06 ` Kees Cook
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox