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:
parent
1049139499
commit
41229392b7
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user