mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 21:00:03 +01: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>
(cherry picked from commit 41229392b7)
This commit is contained in:
parent
500213c1ae
commit
a10fbf0043
1 changed files with 2 additions and 2 deletions
|
|
@ -1265,7 +1265,7 @@ ProcXvDispatch(ClientPtr client)
|
||||||
|
|
||||||
UpdateCurrentTime();
|
UpdateCurrentTime();
|
||||||
|
|
||||||
if (stuff->data > xvNumRequests) {
|
if (stuff->data >= xvNumRequests) {
|
||||||
SendErrorToClient(client, XvReqCode, stuff->data, 0, BadRequest);
|
SendErrorToClient(client, XvReqCode, stuff->data, 0, BadRequest);
|
||||||
return BadRequest;
|
return BadRequest;
|
||||||
}
|
}
|
||||||
|
|
@ -1589,7 +1589,7 @@ SProcXvDispatch(ClientPtr client)
|
||||||
|
|
||||||
UpdateCurrentTime();
|
UpdateCurrentTime();
|
||||||
|
|
||||||
if (stuff->data > xvNumRequests) {
|
if (stuff->data >= xvNumRequests) {
|
||||||
SendErrorToClient(client, XvReqCode, stuff->data, 0, BadRequest);
|
SendErrorToClient(client, XvReqCode, stuff->data, 0, BadRequest);
|
||||||
return BadRequest;
|
return BadRequest;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue