diff mbox series

ipc/msg: Replace one-element array with flexible array member

Message ID 20240930195824.153648-2-thorsten.blum@linux.dev (mailing list archive)
State In Next
Commit d2c853d3fb3ef6f7eab3346c74a21f9a247dba45
Headers show
Series ipc/msg: Replace one-element array with flexible array member | expand

Commit Message

Thorsten Blum Sept. 30, 2024, 7:58 p.m. UTC
Replace the deprecated one-element array with a modern flexible array
member in the struct compat_msgbuf.

There are no binary differences after this conversion.

Link: https://github.com/KSPP/linux/issues/79
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 ipc/msg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/ipc/msg.c b/ipc/msg.c
index fd08b3cb36d7..ee6af4fe52bf 100644
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -978,7 +978,7 @@  SYSCALL_DEFINE4(msgsnd, int, msqid, struct msgbuf __user *, msgp, size_t, msgsz,
 
 struct compat_msgbuf {
 	compat_long_t mtype;
-	char mtext[1];
+	char mtext[];
 };
 
 long compat_ksys_msgsnd(int msqid, compat_uptr_t msgp,