diff options
author | Dave Airlie <airlied@redhat.com> | 2011-10-20 11:00:43 +0100 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@apple.com> | 2011-12-09 12:35:37 -0800 |
commit | 6b11b18ab683e1f38e5b27066b35947b96956e5f (patch) | |
tree | 707ab0b226f3792a3b00c795507a7066c244b322 | |
parent | df16b789aaf5fe7025e5661117477a5f6f9129ee (diff) |
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 41229392b790f30a0f0ef1f4ed95647c5bca4001)
-rw-r--r-- | Xext/xvdisp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c index b96843159..84b10b494 100644 --- a/Xext/xvdisp.c +++ b/Xext/xvdisp.c @@ -1265,7 +1265,7 @@ ProcXvDispatch(ClientPtr client) UpdateCurrentTime(); - if (stuff->data > xvNumRequests) { + if (stuff->data >= xvNumRequests) { SendErrorToClient(client, XvReqCode, stuff->data, 0, BadRequest); return BadRequest; } @@ -1589,7 +1589,7 @@ SProcXvDispatch(ClientPtr client) UpdateCurrentTime(); - if (stuff->data > xvNumRequests) { + if (stuff->data >= xvNumRequests) { SendErrorToClient(client, XvReqCode, stuff->data, 0, BadRequest); return BadRequest; } |