[PATCH 1/2] [RENDER] Fix request size verification

Robert Morell rmorell at nvidia.com
Thu Jan 21 12:38:47 PST 2010


Some requests used the wrong types.

Signed-off-by: Robert Morell <rmorell at nvidia.com>
Reviewed-by: Aaron Plattner <aplattner at nvidia.com>
---
 render/render.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/render/render.c b/render/render.c
index 77e5e03..575bd9f 100644
--- a/render/render.c
+++ b/render/render.c
@@ -656,7 +656,7 @@ ProcRenderSetPictureClipRectangles (ClientPtr client)
     if (!pPicture->pDrawable)
         return BadDrawable;
 
-    nr = (client->req_len << 2) - sizeof(xRenderChangePictureReq);
+    nr = (client->req_len << 2) - sizeof(xRenderSetPictureClipRectanglesReq);
     if (nr & 4)
 	return BadLength;
     nr >>= 3;
@@ -2728,7 +2728,7 @@ PanoramiXRenderChangePicture (ClientPtr client)
     int		    result = Success, j;
     REQUEST(xRenderChangePictureReq);
 
-    REQUEST_AT_LEAST_SIZE(xChangeWindowAttributesReq);
+    REQUEST_AT_LEAST_SIZE(xRenderChangePictureReq);
     
     VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess,
 		       RenderErrBase + BadPicture);
-- 
1.6.4.4



More information about the xorg-devel mailing list