浏览代码

dsp: q6voice: Check size of payload before access

Check size of payload array before access in qdsp_cvp_callback.

Change-Id: Ic5ea6686a1a09df75ddd5e6fdcdfbd74efff83d8
Signed-off-by: Tanya Dixit <[email protected]>
Tanya Dixit 6 年之前
父节点
当前提交
be0391da6c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      dsp/q6voice.c

+ 1 - 1
dsp/q6voice.c

@@ -7908,7 +7908,7 @@ static int32_t qdsp_cvp_callback(struct apr_client_data *data, void *priv)
 	}
 
 	if (data->opcode == APR_BASIC_RSP_RESULT) {
-		if (data->payload_size) {
+		if (data->payload_size >= (2 * sizeof(uint32_t))) {
 			ptr = data->payload;
 
 			pr_debug("%x %x\n", ptr[0], ptr[1]);