summaryrefslogtreecommitdiff
path: root/Xi
diff options
context:
space:
mode:
Diffstat (limited to 'Xi')
-rw-r--r--Xi/getvers.c1
-rw-r--r--Xi/listdev.c3
-rw-r--r--Xi/opendev.c1
3 files changed, 4 insertions, 1 deletions
diff --git a/Xi/getvers.c b/Xi/getvers.c
index f8fd56e6d..b4bc468ea 100644
--- a/Xi/getvers.c
+++ b/Xi/getvers.c
@@ -116,6 +116,7 @@ ProcXGetExtensionVersion(ClientPtr client)
pXIClient->minor_version = stuff->minorVersion;
} /* else version unknown, leave it at 0.0 */
+ memset(&rep, 0, sizeof(xGetExtensionVersionReply));
rep.repType = X_Reply;
rep.RepType = X_GetExtensionVersion;
rep.length = 0;
diff --git a/Xi/listdev.c b/Xi/listdev.c
index 9a5a189de..48c1e059b 100644
--- a/Xi/listdev.c
+++ b/Xi/listdev.c
@@ -338,6 +338,7 @@ ProcXListInputDevices(ClientPtr client)
REQUEST_SIZE_MATCH(xListInputDevicesReq);
+ memset(&rep, 0, sizeof(xListInputDevicesReply));
rep.repType = X_Reply;
rep.RepType = X_ListInputDevices;
rep.length = 0;
@@ -379,7 +380,7 @@ ProcXListInputDevices(ClientPtr client)
}
total_length = numdevs * sizeof(xDeviceInfo) + size + namesize;
- devbuf = (char *)xalloc(total_length);
+ devbuf = (char *)xcalloc(1, total_length);
classbuf = devbuf + (numdevs * sizeof(xDeviceInfo));
namebuf = classbuf + size;
savbuf = devbuf;
diff --git a/Xi/opendev.c b/Xi/opendev.c
index 41edb0f90..502bdfc2a 100644
--- a/Xi/opendev.c
+++ b/Xi/opendev.c
@@ -126,6 +126,7 @@ ProcXOpenDevice(ClientPtr client)
if (status != Success)
return status;
+ memset(&rep, 0, sizeof(xOpenDeviceReply));
rep.repType = X_Reply;
rep.RepType = X_OpenDevice;
rep.sequenceNumber = client->sequence;