diff options
Diffstat (limited to 'ipc/compat_mq.c')
-rw-r--r-- | ipc/compat_mq.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ipc/compat_mq.c b/ipc/compat_mq.c index d8d1e9ff4e88..380ea4fe08e7 100644 --- a/ipc/compat_mq.c +++ b/ipc/compat_mq.c | |||
@@ -53,6 +53,9 @@ asmlinkage long compat_sys_mq_open(const char __user *u_name, | |||
53 | void __user *p = NULL; | 53 | void __user *p = NULL; |
54 | if (u_attr && oflag & O_CREAT) { | 54 | if (u_attr && oflag & O_CREAT) { |
55 | struct mq_attr attr; | 55 | struct mq_attr attr; |
56 | |||
57 | memset(&attr, 0, sizeof(attr)); | ||
58 | |||
56 | p = compat_alloc_user_space(sizeof(attr)); | 59 | p = compat_alloc_user_space(sizeof(attr)); |
57 | if (get_compat_mq_attr(&attr, u_attr) || | 60 | if (get_compat_mq_attr(&attr, u_attr) || |
58 | copy_to_user(p, &attr, sizeof(attr))) | 61 | copy_to_user(p, &attr, sizeof(attr))) |
@@ -127,6 +130,8 @@ asmlinkage long compat_sys_mq_getsetattr(mqd_t mqdes, | |||
127 | struct mq_attr __user *p = compat_alloc_user_space(2 * sizeof(*p)); | 130 | struct mq_attr __user *p = compat_alloc_user_space(2 * sizeof(*p)); |
128 | long ret; | 131 | long ret; |
129 | 132 | ||
133 | memset(&mqstat, 0, sizeof(mqstat)); | ||
134 | |||
130 | if (u_mqstat) { | 135 | if (u_mqstat) { |
131 | if (get_compat_mq_attr(&mqstat, u_mqstat) || | 136 | if (get_compat_mq_attr(&mqstat, u_mqstat) || |
132 | copy_to_user(p, &mqstat, sizeof(mqstat))) | 137 | copy_to_user(p, &mqstat, sizeof(mqstat))) |