Skip to content

Commit 8a9307b

Browse files
Alex Hungmehmetb0
authored andcommitted
drm/amd/display: Check null pointer before dereferencing se
BugLink: https://bugs.launchpad.net/bugs/2097301 [ Upstream commit ff599ef ] [WHAT & HOW] se is null checked previously in the same function, indicating it might be null; therefore, it must be checked when used again. This fixes 1 FORWARD_NULL issue reported by Coverity. Acked-by: Alex Hung <[email protected]> Reviewed-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Alex Hung <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Sasha Levin <[email protected]> CVE-2024-50049 Signed-off-by: Manuel Diewald <[email protected]> Signed-off-by: Koichiro Den <[email protected]>
1 parent 05eb4aa commit 8a9307b

File tree

1 file changed

+1
-1
lines changed
  • drivers/gpu/drm/amd/display/dc/core

1 file changed

+1
-1
lines changed

drivers/gpu/drm/amd/display/dc/core/dc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1786,7 +1786,7 @@ bool dc_validate_boot_timing(const struct dc *dc,
17861786
if (crtc_timing->pix_clk_100hz != pix_clk_100hz)
17871787
return false;
17881788

1789-
if (!se->funcs->dp_get_pixel_format)
1789+
if (!se || !se->funcs->dp_get_pixel_format)
17901790
return false;
17911791

17921792
if (!se->funcs->dp_get_pixel_format(

0 commit comments

Comments
 (0)