lsm: check payload size validity before using it as array index

Payload size validity is not checked before using it in array index.
Check payload size to avoid out-of-boundary memory.

Change-Id: Ic0b06bb331fc1753ff7543bb218ab12d6a4a3ca8
Signed-off-by: Kunlei Zhang <kunleiz@codeaurora.org>
This commit is contained in:
Kunlei Zhang
2019-01-23 17:18:19 +08:00
committed by Gerrit - the friendly Code Review server
parent d14c2dc368
commit 16e535969b
3 changed files with 66 additions and 14 deletions

View File

@@ -21,7 +21,7 @@
#define LSM_API_VERSION_V3 3
typedef void (*lsm_app_cb)(uint32_t opcode, uint32_t token,
uint32_t *payload, void *priv);
uint32_t *payload, uint16_t client_size, void *priv);
struct lsm_sound_model {
dma_addr_t phys;