Fix screen number checks.
screenInfo.numScreens is not a valid screen number, they go from 0 to numScreens - 1. Signed-off-by: Cyril Brulebois <kibi@debian.org> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
committed by
Keith Packard
parent
8684543021
commit
279ef1ffd7
@@ -398,7 +398,7 @@ EphyrDuplicateVisual (unsigned int a_screen,
|
||||
int i=0 ;
|
||||
|
||||
EPHYR_LOG ("enter\n") ;
|
||||
if (a_screen > screenInfo.numScreens) {
|
||||
if (a_screen >= screenInfo.numScreens) {
|
||||
EPHYR_LOG_ERROR ("bad screen number\n") ;
|
||||
goto out;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user