diff options
author | marha <marha@users.sourceforge.net> | 2009-11-23 19:45:07 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-11-23 19:45:07 +0000 |
commit | 4d4234ac0efdc2b76562ff336467449d41f9a379 (patch) | |
tree | 351e5746224070c93dbe13bc4d875de9cdbb3019 /xorg-server/hw/xwin/glx/indirect.c | |
parent | 96b4fdae776275766a999eb6fcf94827b1073bba (diff) | |
download | vcxsrv-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.c | 13 |
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)) { |