From 0ddfa7d574e0f3a7510b0be6c8ed807af017223f Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Fri, 7 May 2010 08:38:20 +0000 Subject: 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 Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie --- drivers/gpu/drm/drm_edid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 326f28e04aab..0acb83a63727 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -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, -- cgit v1.2.3