Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e55268f0 authored by Ashay Jaiswal's avatar Ashay Jaiswal Committed by Gerrit - the friendly Code Review server
Browse files

power: qpnp-fg: fix out-of-bound array access



Bucket based cycle counter implementation allows user-space
to set the bucket-id and read counter associated with the bucket.
There is a possibility of setting bucket-id beyond maximum bucket
count resulting in out of bound array access.

Fix this by adding check to reject bucket-id if it is greater than
maximum bucket size.

CRs-Fixed: 847140
Change-Id: I9c0e9a7687fa3e765fe15a98176177d12a92b33d
Signed-off-by: default avatarAshay Jaiswal <ashayj@codeaurora.org>
parent 819f45d3
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