drm/amd/display: Check msg_id before processing transcation
authorAlex Hung <alex.hung@amd.com>
Tue, 16 Apr 2024 22:47:42 +0000 (16:47 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 2 May 2024 20:18:17 +0000 (16:18 -0400)
commitfa71face755e27dc44bc296416ebdf2c67163316
treeee7b0661b4d5f757455e83995f547ce9ade30884
parentefabdce3db9f3d306084c8946983f3d895810a6b
drm/amd/display: Check msg_id before processing transcation

[WHY & HOW]
HDCP_MESSAGE_ID_INVALID (-1) is not a valid msg_id nor is it a valid
array index, and it needs checking before used.

This fixes 4 OVERRUN issues reported by Coverity.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/hdcp/hdcp_msg.c