mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-30 21:53:25 +00:00
Coverity #490: Fix a range check in xf86vidmode extension.
This commit is contained in:
parent
152090ce44
commit
a3ef63696c
2 changed files with 4 additions and 1 deletions
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Reference in a new issue