Skip to content

Commit

Permalink
drm: off by one in drm_edid.c
Browse files Browse the repository at this point in the history
m == num_est3_modes is one past the end of the est3_modes[].

Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Dan Carpenter authored and Dave Airlie committed May 18, 2010
1 parent 3b9676e commit 0ddfa7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/drm_edid.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0ddfa7d

Please sign in to comment.