From 2ea12b56d42686f75deb33fc126d09acee7e2899 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 1 Jun 2012 23:22:31 +0100 Subject: [PATCH] legacy/i810: Fix memset(sizeof(*ptr)) rather than memset(sizeof(ptr)) Clear the entire structure and not the first 4 bytes... Reported-by: Zdenek Kabelac Signed-off-by: Chris Wilson --- src/legacy/i810/i810_dri.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/legacy/i810/i810_dri.c b/src/legacy/i810/i810_dri.c index 2f02dd92..2b3f1e19 100644 --- a/src/legacy/i810/i810_dri.c +++ b/src/legacy/i810/i810_dri.c @@ -959,7 +959,7 @@ I810DRIFinishScreenInit(ScreenPtr pScreen) ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); I810Ptr info = I810PTR(pScrn); - memset(sPriv, 0, sizeof(sPriv)); + memset(sPriv, 0, sizeof(*sPriv)); /* Have shadow run only while there is 3d active. */