summaryrefslogtreecommitdiff
path: root/xserver/hw/vfb/InitOutput.c
diff options
context:
space:
mode:
Diffstat (limited to 'xserver/hw/vfb/InitOutput.c')
-rw-r--r--xserver/hw/vfb/InitOutput.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/xserver/hw/vfb/InitOutput.c b/xserver/hw/vfb/InitOutput.c
index 31ed50533..c17f12c38 100644
--- a/xserver/hw/vfb/InitOutput.c
+++ b/xserver/hw/vfb/InitOutput.c
@@ -280,7 +280,9 @@ ddxProcessArgument(int argc, char *argv[], int i)
int screenNum;
CHECK_FOR_REQUIRED_ARGUMENTS(2);
screenNum = atoi(argv[i+1]);
- if (screenNum < 0)
+ /* The protocol only has a CARD8 for number of screens in the
+ connection setup block, so don't allow more than that. */
+ if ((screenNum < 0) || (screenNum >= 255))
{
ErrorF("Invalid screen number %d\n", screenNum);
UseMsg();
@@ -864,6 +866,8 @@ vfbScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
(1 << DirectColor)),
10, TrueColor, 0x3ff00000, 0x000ffc00, 0x000003ff);
break;
+ default:
+ return FALSE;
}
miSetPixmapDepths ();