aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/glx/indirect.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-11-23 19:45:07 +0000
committermarha <marha@users.sourceforge.net>2009-11-23 19:45:07 +0000
commit4d4234ac0efdc2b76562ff336467449d41f9a379 (patch)
tree351e5746224070c93dbe13bc4d875de9cdbb3019 /xorg-server/hw/xwin/glx/indirect.c
parent96b4fdae776275766a999eb6fcf94827b1073bba (diff)
downloadvcxsrv-4d4234ac0efdc2b76562ff336467449d41f9a379.tar.gz
vcxsrv-4d4234ac0efdc2b76562ff336467449d41f9a379.tar.bz2
vcxsrv-4d4234ac0efdc2b76562ff336467449d41f9a379.zip
Make sure that uninitialised members of bmpHeader are set to zero.
Diffstat (limited to 'xorg-server/hw/xwin/glx/indirect.c')
-rw-r--r--xorg-server/hw/xwin/glx/indirect.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/xorg-server/hw/xwin/glx/indirect.c b/xorg-server/hw/xwin/glx/indirect.c
index 27c815dc8..d6a2a2cd4 100644
--- a/xorg-server/hw/xwin/glx/indirect.c
+++ b/xorg-server/hw/xwin/glx/indirect.c
@@ -1236,11 +1236,16 @@ glxWinDeferredCreateContext(__GLXWinContext *gc, __GLXWinDrawable *draw)
{
if (draw->dibDC == NULL)
{
- BITMAPINFOHEADER bmpHeader = { sizeof(bmpHeader),
- draw->base.pDraw->width, draw->base.pDraw->height,
- 1, draw->base.pDraw->bitsPerPixel,
- BI_RGB};
+ BITMAPINFOHEADER bmpHeader;
void *pBits;
+
+ ZeroMemory(&bmpHeader,sizeof(bmpHeader));
+ bmpHeader.biSize=sizeof(bmpHeader);
+ bmpHeader.biWidth=draw->base.pDraw->width;
+ bmpHeader.biHeight=draw->base.pDraw->height;
+ bmpHeader.biPlanes=1;
+ bmpHeader.biBitCount=draw->base.pDraw->bitsPerPixel;
+ bmpHeader.biCompression=BI_RGB;
if (!(gc->base.config->drawableType & GLX_PIXMAP_BIT))
{