diff options
| author | Ben Hutchings <[email protected]> | 2018-06-19 18:17:32 +0000 |
|---|---|---|
| committer | Dmitry Torokhov <[email protected]> | 2018-06-22 00:20:41 +0000 |
| commit | 50fc7b61959af4b95fafce7fe5dd565199e0b61a (patch) | |
| tree | fe2962d4ef55cc1b49a52abbb8b913fff2ec1eb4 /net/unix/garbage.c | |
| parent | Input: elan_i2c - add ELAN0618 (Lenovo v330 15IKB) ACPI ID (diff) | |
| download | kernel-50fc7b61959af4b95fafce7fe5dd565199e0b61a.tar.gz kernel-50fc7b61959af4b95fafce7fe5dd565199e0b61a.zip | |
Input: elan_i2c_smbus - fix more potential stack buffer overflows
Commit 40f7090bb1b4 ("Input: elan_i2c_smbus - fix corrupted stack")
fixed most of the functions using i2c_smbus_read_block_data() to
allocate a buffer with the maximum block size. However three
functions were left unchanged:
* In elan_smbus_initialize(), increase the buffer size in the same
way.
* In elan_smbus_calibrate_result(), the buffer is provided by the
caller (calibrate_store()), so introduce a bounce buffer. Also
name the result buffer size.
* In elan_smbus_get_report(), the buffer is provided by the caller
but happens to be the right length. Add a compile-time assertion
to ensure this remains the case.
Cc: <[email protected]> # 3.19+
Signed-off-by: Ben Hutchings <[email protected]>
Reviewed-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Diffstat (limited to 'net/unix/garbage.c')
0 files changed, 0 insertions, 0 deletions
