drm/amd/display: Adding array index check to prevent memory corruption
authorLeo Chen <leo.chen@amd.com>
Mon, 7 Oct 2024 19:50:35 +0000 (15:50 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 22 Oct 2024 21:50:38 +0000 (17:50 -0400)
commit2c437d9a0b496168e1a1defd17b531f0a526dbe9
tree797aef988261b2b304456afd9b26823a2b8d1db5
parent41094c608a1115b2dd3571ae76461e59253e2ec2
drm/amd/display: Adding array index check to prevent memory corruption

[Why & How]
Array indices out of bound caused memory corruption. Adding checks to
ensure that array index stays in bound.

Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Leo Chen <leo.chen@amd.com>
Signed-off-by: Wayne Lin <wayne.lin@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/clk_mgr/dcn35/dcn35_clk_mgr.c