Skip to contentSkip to conversation

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

PATCH Applied Thorsten Blum 1 participant 1 message Sep 30, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 ipc/msg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ipc/msg.c +1 -1
index fd08b3cb36d7..ee6af4fe52bf 100644
@@ -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,
Signature · 1 line
2.46.2