* [PATCH] ipc/msg: Replace one-element array with flexible array member
@ 2024-09-30 19:58 Thorsten Blum
0 siblings, 0 replies; only message in thread
From: Thorsten Blum @ 2024-09-30 19:58 UTC (permalink / raw)
To: Andrew Morton, Jiebin Sun, Tim Chen
Cc: linux-hardening, Thorsten Blum, linux-kernel
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 --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,
--
2.46.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-09-30 20:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-30 19:58 [PATCH] ipc/msg: Replace one-element array with flexible array member Thorsten Blum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox