From 41229392b790f30a0f0ef1f4ed95647c5bca4001 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 20 Oct 2011 11:00:43 +0100 Subject: [PATCH] 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 Reviewed-by: Alan Coopersmith --- Xext/xvdisp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c index 364a90cf2..0795a1475 100644 --- a/Xext/xvdisp.c +++ b/Xext/xvdisp.c @@ -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; }