Input: synaptics-rmi4 - fix video buffer size
authorLucas Stach <l.stach@pengutronix.de>
Mon, 4 Nov 2019 23:58:34 +0000 (15:58 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Nov 2019 17:45:15 +0000 (18:45 +0100)
commit8e347aa4e04ba3caf75990630faee4a700bcb93d
tree4910afdd2a31302fca5658f1a1c7f64b776924bf
parentc02230815282a436366d3d0d6de6d2636dd71b74
Input: synaptics-rmi4 - fix video buffer size

commit 003f01c780020daa9a06dea1db495b553a868c29 upstream.

The video buffer used by the queue is a vb2_v4l2_buffer, not a plain
vb2_buffer. Using the wrong type causes the allocation of the buffer
storage to be too small, causing a out of bounds write when
__init_vb2_v4l2_buffer initializes the buffer.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Fixes: 3a762dbd5347 ("[media] Input: synaptics-rmi4 - add support for F54 diagnostics")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20191104114454.10500-1-l.stach@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/input/rmi4/rmi_f54.c