summaryrefslogtreecommitdiff
path: root/drivers/phy/phy-qcom-ufs-qmp-14nm.c
diff options
context:
space:
mode:
authorBen Hutchings <ben.hutchings@codethink.co.uk>2018-06-19 11:17:32 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-07-03 11:23:17 +0200
commit54ae564b35423f25b763bc9e01b489d9f11c034e (patch)
treea10a3892fa8d2d6bea0d48eb301a3478e845cb17 /drivers/phy/phy-qcom-ufs-qmp-14nm.c
parent2a1b1234d0502237872f6a11016061328528b86d (diff)
Input: elan_i2c_smbus - fix more potential stack buffer overflows
commit 50fc7b61959af4b95fafce7fe5dd565199e0b61a upstream. 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: <stable@vger.kernel.org> # 3.19+ Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/phy/phy-qcom-ufs-qmp-14nm.c')
0 files changed, 0 insertions, 0 deletions