소스 검색

disp: msm: Check QSEECOM response only if message length is not 0

The received message logic in the SDE HDCP layer reads the HDCP QSEECOM
response content regardless of the declared response length. Update
this logic to only use the response content if the response length
is non zero.

Change-Id: Ie39923302a5478e0dd39dd5ceaade70b2e4125a3
Signed-off-by: Christopher Braga <[email protected]>
Christopher Braga 6 년 전
부모
커밋
6071b67ae7
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      msm/sde_hdcp_2x.c

+ 4 - 1
msm/sde_hdcp_2x.c

@@ -589,7 +589,10 @@ static void sde_hdcp_2x_msg_recvd(struct sde_hdcp_2x_ctrl *hdcp)
 		goto exit;
 	}
 
-	out_msg = (u32)hdcp->app_data.response.data[0];
+	if (hdcp->app_data.response.length == 0)
+		out_msg = INVALID_MESSAGE;
+	else
+		out_msg = (u32)hdcp->app_data.response.data[0];
 
 	pr_debug("[tz]: %s\n", sde_hdcp_2x_message_name(out_msg));