Update of /cvsroot/netrek/client/cow
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv28798

Modified Files:
	ping.c short.c socket.c 
Log Message:
initialise packet buffers

Index: short.c
===================================================================
RCS file: /cvsroot/netrek/client/cow/short.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- short.c	11 Jun 1999 16:14:17 -0000	1.3
+++ short.c	22 May 2006 13:13:24 -0000	1.4
@@ -3,6 +3,9 @@
 /* HW 19.07.93
  *
  * $Log$
+ * Revision 1.4  2006/05/22 13:13:24  quozl
+ * initialise packet buffers
+ *
  * Revision 1.3  1999/06/11 16:14:17  siegl
  * cambot replay patches
  *
@@ -1286,6 +1289,7 @@
 {
   struct shortreq_cpacket shortReq;
 
+  bzero(&shortReq, sizeof(shortReq));
   shortReq.type = CP_S_REQ;
   shortReq.req = state;
   shortReq.version = shortversion;		 /* need a var now because 2

Index: socket.c
===================================================================
RCS file: /cvsroot/netrek/client/cow/socket.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- socket.c	20 May 2006 08:48:16 -0000	1.10
+++ socket.c	22 May 2006 13:13:24 -0000	1.11
@@ -8,6 +8,9 @@
  * Routines to allow connection to the xtrek server.
  *
  * $Log$
+ * Revision 1.11  2006/05/22 13:13:24  quozl
+ * initialise packet buffers
+ *
  * Revision 1.10  2006/05/20 08:48:16  quozl
  * fix some valgrind use of uninitialised data reports
  *
@@ -1650,6 +1653,7 @@
 {
   struct speed_cpacket speedReq;
 
+  bzero(&speedReq, sizeof(speedReq));
   speedReq.type = type;
   speedReq.speed = state;
   sendServerPacket((struct player_spacket *) &speedReq);
@@ -1947,6 +1951,7 @@
 {
   struct outfit_cpacket outfitReq;
 
+  bzero(&outfitReq, sizeof(outfitReq));
   outfitReq.type = CP_OUTFIT;
   outfitReq.team = team;
   outfitReq.ship = ship;
@@ -2221,6 +2226,7 @@
 {
   struct mesg_cpacket mesPacket;
 
+  bzero(&mesPacket, sizeof(mesPacket));
 #ifdef SHORT_PACKETS
   if (recv_short)
     {
@@ -2577,6 +2583,7 @@
 {
   struct reserved_cpacket response;
 
+  bzero(&response, sizeof(response));
 #ifdef CORRUPTED_PACKETS
   if (sock == udpSock)
     {
@@ -2656,6 +2663,7 @@
 
 #endif
 
+  bzero(&response, sizeof(response));
   response.type = CP_RSA_KEY;
   /* encryptRSAPacket (packet, &response);      old style rsa-client  */
 

Index: ping.c
===================================================================
RCS file: /cvsroot/netrek/client/cow/ping.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- ping.c	1 Nov 1998 17:24:11 -0000	1.1.1.1
+++ ping.c	22 May 2006 13:13:24 -0000	1.2
@@ -2,6 +2,9 @@
 /* ping.c
  *
  * $Log$
+ * Revision 1.2  2006/05/22 13:13:24  quozl
+ * initialise packet buffers
+ *
  * Revision 1.1.1.1  1998/11/01 17:24:11  siegl
  * COW 3.0 initial revision
  * */
@@ -117,6 +120,7 @@
   else
     s = sock;
 
+  bzero(&packet, sizeof(packet));
   packet.type = CP_PING_RESPONSE;
   packet.pingme = (char) ping;
   packet.number = (unsigned char) number;