Skip to content
Commit 3c54a3ff authored by Dan Carpenter's avatar Dan Carpenter Committed by Manivannan Sadhasivam
Browse files

bus: mhi: ep: Fix off by one in mhi_ep_process_cmd_ring()



The > comparison should be changed to >= to prevent an out of bounds
access into the mhi_cntrl->mhi_chan[] array.  The mhi_cntrl->mhi_chan[]
array is allocated in mhi_ep_chan_init() and has mhi_cntrl->max_chan
elements.

Fixes: 6de4941c ("bus: mhi: ep: Check if the channel is supported by the controller")
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Reviewed-by: default avatarManivannan Sadhasivam <mani@kernel.org>
Reviewed-by: default avatarAlex Elder <elder@linaro.org>
Link: https://lore.kernel.org/r/Y9JH5sudiZWvbODv@kili


Signed-off-by: default avatarManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
parent 1ddc7618
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment