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

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

View File

@ -18,6 +18,9 @@
* xfixes/xfixes.c:
Coverity #487: Check version number correctly.
* hw/xfree86/common/xf86VidMode.c:
Coverity #490: Fix a range check in xf86vidmode extension.
2006-03-15 Benjamin Herrenschmidt <benh@kernel.crashing.org>
* hw/xfree86/dri/dri.c: (DRIExtensionInit):

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];