sctp: Replace zero-length array with flexible array member
Subsystems (2)
PATCH 1/1 sctp: Replace zero-length array with flexible array member
Replace the deprecated zero-length array with a modern flexible array member in the struct sctp_idatahdr.
Signed-off-by Thorsten Blum <[email protected]>
--- include/linux/sctp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/sctp.h +1 -1
@@ -239,7 +239,7 @@ struct sctp_idatahdr {__u32 ppid;__be32 fsn; }; -__u8 payload[0 ]; +__u8 payload[]; };struct sctp_idata_chunk {
Signature · 1 line
2.47.0
Quoted 5 lines · Thorsten Blum
Replace the deprecated zero-length array with a modern flexible array member in the struct
sctp_idatahdr.Signed-off-by Thorsten Blum <[email protected]>
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 <[email protected]>
Signature · 1 line
Kees Cook