msm: vidc: Ensure validity of shared Q indices

Video driver and firmware communicates over shared queue.
The queue header has the indices which synchronizes the read
and write between the driver and firmware modules.
This change ensures that the indices are within the valid
range before accessing them.

Issue: SEC-1895
CRs-fixed: 2345481
Bug: 114073969
Change-Id: I8da6bb4218a5b8ec0e2e2c7b87f6cc9eec21bd16
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
(adapted from commit 7b388db6d8029db8f1f1e6c6613203fc5e08d43e)
1 file changed