xf86-video-intel: src/i830_hwmc.c

Daniel Vetter danvet at kemper.freedesktop.org
Thu Apr 8 13:37:05 PDT 2010


 src/i830_hwmc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 80f52482c7cde000a76b91fe3d8b6c16baf2141f
Author: Daniel Vetter <daniel.vetter at ffwll.ch>
Date:   Thu Apr 8 22:30:33 2010 +0200

    XvMC: fix memory overflow
    
    Caught by a malloc library assert.
    
    Note to self: Don't just copy&paste codelines around :(
    
    Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
    Buzilla: https://bugs.freedesktop.org/show_bug.cgi?id=27540
    Tested-by: Nick Bowler <nbowler at draconx.ca>
    Tested-by: Calvin Walton <calvin.walton at gmail.com>

diff --git a/src/i830_hwmc.c b/src/i830_hwmc.c
index c75e420..850bf87 100644
--- a/src/i830_hwmc.c
+++ b/src/i830_hwmc.c
@@ -207,7 +207,7 @@ Bool intel_xvmc_adaptor_init(ScreenPtr pScreen)
 		return FALSE;
 	}
 
-	pAdapt = xcalloc(1, sizeof(struct intel_xvmc_hw_context));
+	pAdapt = xcalloc(1, sizeof(XF86MCAdaptorRec));
 	if (!pAdapt) {
 		ErrorF("Allocation error.\n");
 		return FALSE;


More information about the xorg-commit mailing list