diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c index a36f7d61d..68c362c62 100644 --- a/Xi/xiproperty.c +++ b/Xi/xiproperty.c @@ -902,6 +902,8 @@ ProcXChangeDeviceProperty(ClientPtr client) rc = check_change_property(client, stuff->property, stuff->type, stuff->format, stuff->mode, stuff->nUnits); + if (rc != Success) + return rc; len = stuff->nUnits; if (len > (bytes_to_int32(0xffffffff - sizeof(xChangeDevicePropertyReq)))) @@ -1141,6 +1143,9 @@ ProcXIChangeProperty(ClientPtr client) rc = check_change_property(client, stuff->property, stuff->type, stuff->format, stuff->mode, stuff->num_items); + if (rc != Success) + return rc; + len = stuff->num_items; if (len > bytes_to_int32(0xffffffff - sizeof(xXIChangePropertyReq))) return BadLength;