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:
Ashay Jaiswal <ashayj@codeaurora.org>
Loading
Please register or sign in to comment