summaryrefslogtreecommitdiff
path: root/xserver/hw/xfree86/modes/xf86EdidModes.c
diff options
context:
space:
mode:
Diffstat (limited to 'xserver/hw/xfree86/modes/xf86EdidModes.c')
-rw-r--r--xserver/hw/xfree86/modes/xf86EdidModes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xserver/hw/xfree86/modes/xf86EdidModes.c b/xserver/hw/xfree86/modes/xf86EdidModes.c
index f0e1e974b..f903496f5 100644
--- a/xserver/hw/xfree86/modes/xf86EdidModes.c
+++ b/xserver/hw/xfree86/modes/xf86EdidModes.c
@@ -976,8 +976,8 @@ handle_cea_svd(struct cea_video_block *video, void *data)
int vid;
vid = video->video_code & 0x7f;
- if (vid < CEA_VIDEO_MODES_NUM) {
- Mode = xf86DuplicateMode(CEAVideoModes + vid);
+ if (vid >= 1 && vid <= CEA_VIDEO_MODES_NUM) {
+ Mode = xf86DuplicateMode(CEAVideoModes + (vid - 1));
*Modes = xf86ModesAdd(*Modes, Mode);
}
}