commit: r431 - trunk/daemon

[email protected] Thu, 18 Jun 2009 16:08:55 -0400
Newsgroups gmane.network.spread.cvs
Message-ID <[email protected]>
Author: jonathan
Date: 2009-06-18 16:08:55 -0400 (Thu, 18 Jun 2009)
New Revision: 431

Modified:
   trunk/daemon/Changelog
   trunk/daemon/config_parse.y
Log:
Use MAXHOSTNAMELEN for length of host name string instead of fixed value.


Modified: trunk/daemon/Changelog
===================================================================
--- trunk/daemon/Changelog	2009-06-11 17:38:21 UTC (rev 430)
+++ trunk/daemon/Changelog	2009-06-18 20:08:55 UTC (rev 431)
@@ -1,3 +1,8 @@
+Thu Jun 18 16:07:43 2009  Jonathan Stanton  <[email protected]>
+
+	* config_parse.y (%): Use MAXHOSTNAMELEN instead of fixed length
+	for host name string.
+
 Thu Jun 11 13:36:11 2009  Jonathan Stanton  <[email protected]>
 
 	* config_gram.l: Define YY_NO_UNISTD_H for Windows builds so that

Modified: trunk/daemon/config_parse.y
===================================================================
--- trunk/daemon/config_parse.y	2009-06-11 17:38:21 UTC (rev 430)
+++ trunk/daemon/config_parse.y	2009-06-18 20:08:55 UTC (rev 431)
@@ -134,7 +134,7 @@
 {
   const char *in_loc;
   char *out_loc;
-  char hostn[256];
+  char hostn[MAXHOSTNAMELEN+1];
   
   for ( in_loc = in_string, out_loc = out_string; out_loc - out_string < str_size; in_loc++ )
   {