mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 10:14:52 +00:00
xv: test correct number of requests. (v2)
Pointed out by coverity. v2: fix swapped as well, as pointed out by Alan Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
@@ -1238,7 +1238,7 @@ ProcXvDispatch(ClientPtr client)
|
||||
|
||||
UpdateCurrentTime();
|
||||
|
||||
if (stuff->data > xvNumRequests) {
|
||||
if (stuff->data >= xvNumRequests) {
|
||||
SendErrorToClient(client, XvReqCode, stuff->data, 0, BadRequest);
|
||||
return BadRequest;
|
||||
}
|
||||
@@ -1542,7 +1542,7 @@ SProcXvDispatch(ClientPtr client)
|
||||
|
||||
UpdateCurrentTime();
|
||||
|
||||
if (stuff->data > xvNumRequests) {
|
||||
if (stuff->data >= xvNumRequests) {
|
||||
SendErrorToClient(client, XvReqCode, stuff->data, 0, BadRequest);
|
||||
return BadRequest;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user