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

Modified Files:
	parsemeta.c 
Log Message:
fix segfault from comment length

Index: parsemeta.c
===================================================================
RCS file: /cvsroot/netrek/client/cow/parsemeta.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- parsemeta.c	14 Apr 2006 10:35:37 -0000	1.11
+++ parsemeta.c	27 Nov 2006 00:36:55 -0000	1.12
@@ -1,6 +1,9 @@
 /* meta.c
  * 
  * $Log$
+ * Revision 1.12  2006/11/27 00:36:55  quozl
+ * fix segfault from comment length
+ *
  * Revision 1.11  2006/04/14 10:35:37  quozl
  * fix sscanf compiler warning
  *
@@ -586,7 +589,7 @@
   
   p = strtok(NULL,",");		/* comment */
   if (p == NULL) return;
-  char *comment = strdup(p);
+  char *comment = strndup(p, LINE-1);
 
   p = strtok(NULL,",");		/* number of ports */
   if (p == NULL) return;