mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
drivers/gpu/drm/drm_ioc32.c: initialize all fields
The c32 structure is allocated on the stack and its idx field is not initialized before copying it to user level. This patch takes the value from the result of the ioctl, as done for the other fields. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
6c073a7ee2
commit
08bc3d4e67
1 changed files with 2 additions and 1 deletions
|
@ -315,7 +315,8 @@ static int compat_drm_getclient(struct file *file, unsigned int cmd,
|
|||
if (err)
|
||||
return err;
|
||||
|
||||
if (__get_user(c32.auth, &client->auth)
|
||||
if (__get_user(c32.idx, &client->idx)
|
||||
|| __get_user(c32.auth, &client->auth)
|
||||
|| __get_user(c32.pid, &client->pid)
|
||||
|| __get_user(c32.uid, &client->uid)
|
||||
|| __get_user(c32.magic, &client->magic)
|
||||
|
|
Loading…
Reference in a new issue