aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/Xext
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/Xext')
-rw-r--r--nx-X11/programs/Xserver/Xext/shm.c5
-rw-r--r--nx-X11/programs/Xserver/Xext/xf86bigfont.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/nx-X11/programs/Xserver/Xext/shm.c b/nx-X11/programs/Xserver/Xext/shm.c
index e3fa3a24e..263adc3df 100644
--- a/nx-X11/programs/Xserver/Xext/shm.c
+++ b/nx-X11/programs/Xserver/Xext/shm.c
@@ -660,6 +660,7 @@ ProcPanoramiXShmGetImage(ClientPtr client)
for(i = 1; i < PanoramiXNumScreens; i++)
VERIFY_DRAWABLE(drawables[i], draw->info[i].id, client);
+ memset(&xgi, 0, sizeof(xShmGetImageReply));
xgi.visual = wVisual(((WindowPtr)pDraw));
xgi.type = X_Reply;
xgi.length = 0;
@@ -913,6 +914,7 @@ ProcShmPutImage(client)
{
xShmCompletionEvent ev;
+ memset(&ev, 0, sizeof(xShmCompletionEvent));
ev.type = ShmCompletionCode;
ev.drawable = stuff->drawable;
ev.minorEvent = X_ShmPutImage;
@@ -947,6 +949,9 @@ ProcShmGetImage(client)
}
VERIFY_DRAWABLE(pDraw, stuff->drawable, client);
VERIFY_SHMPTR(stuff->shmseg, stuff->offset, TRUE, shmdesc, client);
+
+ memset(&xgi, 0, sizeof(xShmGetImageReply));
+
if (pDraw->type == DRAWABLE_WINDOW)
{
if( /* check for being viewable */
diff --git a/nx-X11/programs/Xserver/Xext/xf86bigfont.c b/nx-X11/programs/Xserver/Xext/xf86bigfont.c
index 6ec47c4f4..9530a9d7f 100644
--- a/nx-X11/programs/Xserver/Xext/xf86bigfont.c
+++ b/nx-X11/programs/Xserver/Xext/xf86bigfont.c
@@ -354,6 +354,7 @@ ProcXF86BigfontQueryVersion(
xXF86BigfontQueryVersionReply reply;
REQUEST_SIZE_MATCH(xXF86BigfontQueryVersionReq);
+ memset(&reply, 0, sizeof(xXF86BigfontQueryVersionReply));
reply.type = X_Reply;
reply.length = 0;
reply.sequenceNumber = client->sequence;
@@ -638,7 +639,7 @@ ProcXF86BigfontQueryFont(
+ (nCharInfos+1)/2 * 2 * sizeof(CARD16)
: 0);
xXF86BigfontQueryFontReply* reply =
- (xXF86BigfontQueryFontReply *) ALLOCATE_LOCAL(rlength);
+ (xXF86BigfontQueryFontReply *) calloc(1, rlength);
char* p;
if (!reply) {
if (nCharInfos > 0) {
@@ -718,7 +719,7 @@ ProcXF86BigfontQueryFont(
}
}
WriteToClient(client, rlength, reply);
- DEALLOCATE_LOCAL(reply);
+ free(reply);
if (nCharInfos > 0) {
if (shmid == -1) DEALLOCATE_LOCAL(pIndex2UniqIndex);
if (!pDesc) DEALLOCATE_LOCAL(pCI);