Skip to content

Commit

Permalink
drm/edid: fix length check when adding extra 3D modes
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Thomas Wood authored and Dave Airlie committed Dec 5, 2013
1 parent 1ec2c7f commit 7d14b95
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 @@ -2674,7 +2674,7 @@ static int add_3d_struct_modes(struct drm_connector *connector, u16 structure,
int modes = 0;
u8 cea_mode;

if (video_db == NULL || video_index > video_len)
if (video_db == NULL || video_index >= video_len)
return 0;

/* CEA modes are numbered 1..127 */
Expand Down

0 comments on commit 7d14b95

Please sign in to comment.