* [patch] c/r: ipc: uninitialized variable in compat_do_msg_fill()
@ 2012-04-13 13:37 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2012-04-13 13:37 UTC (permalink / raw)
To: Andrew Morton, Stanislav Kinsbursky
Cc: Chris Metcalf, Arnd Bergmann, linux-kernel, kernel-janitors
We never initialize "msgp". It's unfortunate that GCC doesn't warn
about this.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/ipc/compat.c b/ipc/compat.c
index 6da376b..0c2ebd0 100644
--- a/ipc/compat.c
+++ b/ipc/compat.c
@@ -363,7 +363,7 @@ static long compat_do_msg_steal(void __user *dest, struct msg_msg *msg, size_t b
long compat_do_msg_fill(void __user *dest, struct msg_msg *msg, size_t bufsz)
{
- struct compat_msgbuf __user *msgp;
+ struct compat_msgbuf __user *msgp = dest;
size_t msgsz;
if (put_user(msg->m_type, &msgp->mtype))
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [patch] c/r: ipc: uninitialized variable in compat_do_msg_fill()
@ 2012-04-13 13:37 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2012-04-13 13:37 UTC (permalink / raw)
To: Andrew Morton, Stanislav Kinsbursky
Cc: Chris Metcalf, Arnd Bergmann, linux-kernel, kernel-janitors
We never initialize "msgp". It's unfortunate that GCC doesn't warn
about this.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/ipc/compat.c b/ipc/compat.c
index 6da376b..0c2ebd0 100644
--- a/ipc/compat.c
+++ b/ipc/compat.c
@@ -363,7 +363,7 @@ static long compat_do_msg_steal(void __user *dest, struct msg_msg *msg, size_t b
long compat_do_msg_fill(void __user *dest, struct msg_msg *msg, size_t bufsz)
{
- struct compat_msgbuf __user *msgp;
+ struct compat_msgbuf __user *msgp = dest;
size_t msgsz;
if (put_user(msg->m_type, &msgp->mtype))
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-13 13:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-13 13:37 [patch] c/r: ipc: uninitialized variable in compat_do_msg_fill() Dan Carpenter
2012-04-13 13:37 ` Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.