base: genlock: Zero a structure before sending it to user space

In the handler for GENLOCK_IOC_EXPORT zero the entire genlock_lock
structure before passing it to the user.

CRs-fixed: 552303
Change-Id: Ic0dedbad257bf0a448d0bf67a14a3932b7925bfc
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
This commit is contained in:
Jordan Crouse
2013-10-16 09:08:09 -06:00
parent bb27c7ac3a
commit becda46ce3
+2
View File
@@ -788,6 +788,8 @@ static long genlock_dev_ioctl(struct file *filep, unsigned int cmd,
if (ret < 0)
return ret;
memset(&param, 0, sizeof(param));
param.fd = ret;
if (copy_to_user((void __user *) arg, &param,