diff options
author | Irina Tirdea <irina.tirdea@intel.com> | 2015-04-13 18:40:50 +0300 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-04-26 21:40:53 +0300 |
commit | 2a4d20322d1c619ae2f07378d5b360e85f562c98 (patch) | |
tree | ef6f854ff2e9e79ad4c9e1c6399fe1e4f6f36db2 /drivers/iio/accel/mma9553.c | |
parent | cd62322a9767f9a0bcf855123c478187e38a10f4 (diff) | |
download | linux-2a4d20322d1c619ae2f07378d5b360e85f562c98.tar.xz |
iio: accel: mma9551_core: prevent buffer overrun
The mma9551 functions that read/write word arrays from the
device have a limit for the buffer size given by the device
specifications.
Check that the requested buffer length is within required limits
when transferring word arrays. This will prevent buffer overrun
in the mma9551_read/write_*_words functions and also in the
mma9551_transfer call when writing into the MBOX response/request
structure.
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Reported-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/accel/mma9553.c')
0 files changed, 0 insertions, 0 deletions