drm: off by one in drm_edid.c
Subsystems (2)
PATCH 1/1 drm: off by one in drm_edid.c
m == num_est3_modes is one past the end of the est3_modes[].
Signed-off-by Dan Carpenter <[email protected]>
drivers/gpu/drm/drm_edid.c +1 -1
@@ -1383,7 +1383,7 @@ drm_est3_modes(struct drm_connector *connector, struct detailed_timing *timing)for (i =0 ; i <6 ; i++) {for (j =7 ; j >0 ; j--) { m = (i *8 ) + (7 - j); -if (m > num_est3_modes) +if (m >= num_est3_modes)break ;if (est[i] & (1 << j)) { mode = drm_find_dmt(connector->dev,
------------------------------------------------------------------------------
--
Quoted 9 lines · Dan Carpenter
m ==
num_est3_modesis one past the end of the est3_modes[].Signed-off-by Dan Carpenter <[email protected]>drivers/gpu/drm/drm_edid.c +0
-0
drivers/gpu/drm/drm_edid.c drm_est3_modes(struct drm_connector *connector, struct detailed_timing *timing) · line 1389
Quoted 8 lines
drivers/gpu/drm/drm_edid.c +1
-1@@ -1383,7 +1383,7 @@ drm_est3_modes(struct drm_connector *connector, struct detailed_timing *timing)for (i =0 ; i <6 ; i++) {for (j =7 ; j >0 ; j--) { m = (i *8 ) + (7 - j); -if (m > num_est3_modes) +if (m >= num_est3_modes)break ;if (est[i] & (1 << j)) { mode = drm_find_dmt(connector->dev,
Reviewed-by Adam Jackson <[email protected]>
- ajax
------------------------------------------------------------------------------
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel