diff --git a/xkb/xkb.c b/xkb/xkb.c index 30a5b53f72..31263a9aed 100644 --- a/xkb/xkb.c +++ b/xkb/xkb.c @@ -1632,7 +1632,7 @@ CheckKeyTypes(ClientPtr client, } n = i + req->firstType; width = wire->numLevels; - if (width < 1) { + if (width < 1 || width > XkbMaxShiftLevel) { *nMapsRtrn = _XkbErrCode3(0x04, n, width); return 0; }