Zero out the ENGPACKET allocated on the stack, to avoid sending uninitialized
authorEric Anholt <anholt@FreeBSD.org>
Sun, 26 Jun 2005 21:02:58 +0000 (21:02 +0000)
committerEric Anholt <anholt@FreeBSD.org>
Sun, 26 Jun 2005 21:02:58 +0000 (21:02 +0000)
values to reserved fields on the card, resulting in all-black output and
sometimes hangs.

Submitted by: Thomas Winischhofer

src/mesa/drivers/dri/sis/sis_screen.c

index ccfa959c9affc2fec1eea6647ca95a5822540cad..e6c398f4e2832e9082d23e1a384dad3cc6f10af5 100644 (file)
@@ -316,6 +316,8 @@ static void sisCopyBuffer( __DRIdrawablePrivate *dPriv )
    int i;
    ENGPACKET stEngPacket;
   
+   memset(&stEngPacket, 0, sizeof(ENGPACKET));
+
    while ((*smesa->FrameCountPtr) - MMIO_READ(0x8a2c) > SIS_MAX_FRAME_LENGTH)
       ;