Xext: shape: fix length checking with bigreq
The authorative source of the request frame size is client->req_len, especially with big requests larger than 2^18 bytes. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>
This commit is contained in:
parent
67a3319d73
commit
dab1299745
|
@ -258,7 +258,7 @@ ShapeRectangles(ClientPtr client, xShapeRectanglesReq *stuff)
|
||||||
client->errorValue = stuff->ordering;
|
client->errorValue = stuff->ordering;
|
||||||
return BadValue;
|
return BadValue;
|
||||||
}
|
}
|
||||||
nrects = ((stuff->length << 2) - sizeof(xShapeRectanglesReq));
|
nrects = ((client->req_len << 2) - sizeof(xShapeRectanglesReq));
|
||||||
if (nrects & 4)
|
if (nrects & 4)
|
||||||
return BadLength;
|
return BadLength;
|
||||||
nrects >>= 3;
|
nrects >>= 3;
|
||||||
|
|
Loading…
Reference in New Issue