mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-11 08:54:28 -05:00
28 lines
1.1 KiB
Diff
28 lines
1.1 KiB
Diff
From d906945fc287f9df48b99349fea962b921d4d39e Mon Sep 17 00:00:00 2001
|
|
From: matt_huang <matt_huang@htc.com>
|
|
Date: Mon, 7 Nov 2016 16:22:57 +0800
|
|
Subject: [PATCH] input: misc: fix security vulnerability
|
|
|
|
initialize the structure before using
|
|
Bug: 32591129
|
|
|
|
Change-Id: I9a3af40175d929009522f6c93005d82535c4ccc3
|
|
Signed-off-by: matt_huang <matt_huang@htc.com>
|
|
---
|
|
drivers/input/misc/vl53L0/stmvl53l0_module.c | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
diff --git a/drivers/input/misc/vl53L0/stmvl53l0_module.c b/drivers/input/misc/vl53L0/stmvl53l0_module.c
|
|
index 0028e527857f5..cc27309fc4e20 100644
|
|
--- a/drivers/input/misc/vl53L0/stmvl53l0_module.c
|
|
+++ b/drivers/input/misc/vl53L0/stmvl53l0_module.c
|
|
@@ -2483,6 +2483,8 @@ static int stmvl53l0_ioctl_handler(struct file *file,
|
|
if (!data->enable_ps_sensor)
|
|
stmvl53l0_start(data, 3, NORMAL_MODE);
|
|
|
|
+ memset(&RangingMeasurementData, 0, sizeof(RangingMeasurementData));
|
|
+
|
|
for (i = 0; i < RANGE_MEASUREMENT_TIMES;)
|
|
{
|
|
Status = papi_func_tbl->PerformSingleRangingMeasurement(vl53l0_dev, &RangingMeasurementData);
|