From: Thorsten Blum Date: Mon, 30 Sep 2024 19:58:22 +0000 (+0200) Subject: ipc/msg: replace one-element array with flexible array member X-Git-Tag: v6.13-rc1~89^2~63 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f9a4d8930f272fd76edc1f76062b5ca316bda25d;p=thirdparty%2Fkernel%2Flinux.git ipc/msg: replace one-element array with flexible array member 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 Link: https://lkml.kernel.org/r/20240930195824.153648-2-thorsten.blum@linux.dev Signed-off-by: Thorsten Blum Cc: "Sun, Jiebin" Cc: Tim Chen Signed-off-by: Andrew Morton --- diff --git a/ipc/msg.c b/ipc/msg.c index fd08b3cb36d79..ee6af4fe52bff 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,