qbt_handler: Memset userspace struct to zero
Explicitly memset struct to zero before sending to userspace. This is to prevent padded bytes from possibly leaking kernel memory contents to userspace. Change-Id: Id3e873164430c34195344884b2899e61aa060dfc Signed-off-by: Abir Ghosh <abirg@codeaurora.org>
This commit is contained in:
parent
5b47848843
commit
3511d06529
@ -511,6 +511,7 @@ static long qbt_ioctl(
|
||||
{
|
||||
struct qbt_wuhb_connected_status wuhb_connected_status;
|
||||
|
||||
memset(&wuhb_connected_status, 0, sizeof(wuhb_connected_status));
|
||||
wuhb_connected_status.is_wuhb_connected =
|
||||
drvdata->is_wuhb_connected;
|
||||
rc = copy_to_user((void __user *)priv_arg,
|
||||
|
Loading…
Reference in New Issue
Block a user