diff options
| author | Haibin Liu <haibinl@qti.qualcomm.com> | 2017-10-24 20:32:48 +0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-11-08 19:27:27 -0800 |
| commit | 37347af942221c0b0728b629f92227792f4727ed (patch) | |
| tree | 27d2e9c90a66d76685db3c23ca6a09714d9b9fe1 /scripts/basic/bin2c.c | |
| parent | 8fe7c2f3d90b47cc5da814363ac7a0cd1e0e3d85 (diff) | |
msm: sensor: actuator: avoid accessing out of bound memory
Issue:
When total_steps is updated, after that, copy_from_user
fails with an error, then, i2c_reg_tbl is not allocated.
In this case, when calling msm_actuator_parse_i2c_params,
it lead to out-of-bound memory write.
Fix:
1) Assign total_steps to zero when error from copying.
2) Add NULL pointer check for i2c tbl.
CRs-Fixed: 2111672
Change-Id: Ib9dcb182356e2df8078c131edfd0791fa95a35e0
Signed-off-by: Haibin Liu <haibinl@codeaurora.org>
Diffstat (limited to 'scripts/basic/bin2c.c')
0 files changed, 0 insertions, 0 deletions
