Skip to content
Commit 5d40d95e authored by Andrew Duggan's avatar Andrew Duggan Committed by Dmitry Torokhov
Browse files

Input: synaptics-rmi4 - do not consume more data than we have (F11, F12)



Currently, rmi_f11_attention() and rmi_f12_attention() functions update
the attn_data data pointer and size based on the size of the expected
size of the attention data. However, if the actual valid data in the
attn buffer is less then the expected value then the updated data
pointer will point to memory beyond the end of the attn buffer. Using
the calculated valid_bytes instead will prevent this from happening.

Signed-off-by: default avatarAndrew Duggan <aduggan@synaptics.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20191025002527.3189-3-aduggan@synaptics.com


Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent f6aabe1f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment