drm/amdgpu: Fix out-of-bounds read of df_v1_7_channel_number
authorMa Jun <Jun.Ma2@amd.com>
Tue, 7 May 2024 01:29:33 +0000 (09:29 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 8 May 2024 19:17:07 +0000 (15:17 -0400)
commitd768394fa99467bcf2703bde74ddc96eeb0b71fa
treea0f3fe4927df987f6a3bd9bda3898df89491ff90
parentcdca89bce4984f1bb6e53cd4084820d4ff54f977
drm/amdgpu: Fix out-of-bounds read of df_v1_7_channel_number

Check the fb_channel_number range to avoid the array out-of-bounds
read error

Signed-off-by: Ma Jun <Jun.Ma2@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/df_v1_7.c