summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <Alan.Coopersmith@sun.com>2004-08-07 19:22:01 +0000
committerAlan Coopersmith <Alan.Coopersmith@sun.com>2004-08-07 19:22:01 +0000
commit40a8dac56de796db130b53dc1b01ea7421d0bf93 (patch)
tree81adbadc43dacebbcadbfd5a03a138c896795a83
parent0f92f0f76b812a29bbb748e7588a7208be4c30e2 (diff)
after. (Prevents segfault when array->data is initialized to NULL, but array->length is not set to 0.) Always initialize both data & length in ARRAYs.
-rw-r--r--xdmcp.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/xdmcp.c b/xdmcp.c
index 3e1ac90..da97026 100644
--- a/xdmcp.c
+++ b/xdmcp.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/xdm/xdmcp.c,v 1.2 2004/04/23 19:54:42 eich Exp $ */
+/* $XdotOrg: xc/programs/xdm/xdmcp.c,v 1.3 2004/05/24 19:05:01 eich Exp $ */
/* $Xorg: xdmcp.c,v 1.4 2001/02/09 02:05:41 xorgcvs Exp $ */
/*
@@ -943,13 +943,20 @@ request_respond (
ARRAY8Ptr connectionAddress;
Debug ("Request respond %d\n", length);
+ connectionTypes.length = 0;
connectionTypes.data = 0;
+ connectionAddresses.length = 0;
connectionAddresses.data = 0;
+ authenticationName.length = 0;
authenticationName.data = 0;
+ authenticationData.length = 0;
authenticationData.data = 0;
+ authorizationNames.length = 0;
authorizationNames.data = 0;
authorizationName.length = 0;
+ authorizationName.data = 0;
authorizationData.length = 0;
+ authorizationData.data = 0;
manufacturerDisplayID.data = 0;
if (XdmcpReadCARD16 (&buffer, &displayNumber) &&
XdmcpReadARRAY16 (&buffer, &connectionTypes) &&