diff options
| author | Rahul Sharma <sharah@codeaurora.org> | 2017-11-12 17:10:59 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-11-12 21:38:28 -0800 |
| commit | acbe0dcf092c88507dc8476ea4433c4e71302fb1 (patch) | |
| tree | b5efdfca8e87471ab20820e82c44423a1c26299a /lib/mpi/mpi-bit.c | |
| parent | b0ba6e47923aba09cf52ec9a92c12b114462bd9a (diff) | |
msm: ais: 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.
Change-Id: I4df8557719533900a5c571fc00f9844943c8f7b1
Signed-off-by: Rahul Sharma <sharah@codeaurora.org>
Diffstat (limited to 'lib/mpi/mpi-bit.c')
0 files changed, 0 insertions, 0 deletions
