dsp: validate token before usage as array index

Token from DSP might be invalid for array index. Validate the
token before being used as array index.

Issue: SEC-1938
Bug: 129850483
Change-Id: I9f47e1328d75d9f9acf7e85ddb452019b6eced0a
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
Signed-off-by: Siqi Lin <siqilin@google.com>
(cherry picked from commit 29f93f41df52f0ba54f27aa643bcf01f3d7f55f6)
1 file changed