Coverity #490: Fix a range check in xf86vidmode extension.

This commit is contained in:
Adam Jackson 2006-03-15 16:36:31 +00:00
commit a3ef63696c
2 changed files with 4 additions and 1 deletions

View file

@ -183,7 +183,7 @@ VidModeGetDotClock(int scrnIndex, int Clock)
return 0;
pScrn = xf86Screens[scrnIndex];
if ((pScrn->progClock) || (Clock > MAXCLOCKS))
if ((pScrn->progClock) || (Clock >= MAXCLOCKS))
return Clock;
else
return pScrn->clock[Clock];