Skip to content
Commit 5b69c237 authored by Dan Carpenter's avatar Dan Carpenter Committed by Enric Balletbo i Serra
Browse files

platform/chrome: cros_ec_sensorhub: Off by one in cros_sensorhub_send_sample()

The sensorhub->push_data[] array has sensorhub->sensor_num elements.
It's allocated in cros_ec_sensorhub_ring_add().  So the > should be >=
to prevent a read one element beyond the end of the array.

Fixes: 145d59ba

 ("platform/chrome: cros_ec_sensorhub: Add FIFO support")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarGuenter Roeck <groeck@chromium.org>
Signed-off-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
parent a4638771
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment