[GRASS-SVN] r34178 - grass/branches/develbranch_6/general/manage/lib

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Nov 7 05:54:59 EST 2008


Author: neteler
Date: 2008-11-07 05:54:59 -0500 (Fri, 07 Nov 2008)
New Revision: 34178

Modified:
   grass/branches/develbranch_6/general/manage/lib/read_list.c
Log:
glynn: Fix size of ELEMENT_LIST pathname buffer (merge from trunk, r34174)

Modified: grass/branches/develbranch_6/general/manage/lib/read_list.c
===================================================================
--- grass/branches/develbranch_6/general/manage/lib/read_list.c	2008-11-07 10:42:45 UTC (rev 34177)
+++ grass/branches/develbranch_6/general/manage/lib/read_list.c	2008-11-07 10:54:59 UTC (rev 34178)
@@ -22,7 +22,7 @@
 int read_list(int check_if_empty)
 {
     FILE *fd;
-    char element_list[600];
+    char element_list[GPATH_MAX];
     char buf[1024];
     char elem[100];
     char alias[100];
@@ -36,7 +36,8 @@
     list = 0;
     any = 0;
 
-    if ((env = G__getenv("ELEMENT_LIST")))
+    env = getenv("ELEMENT_LIST");
+    if (env)
 	G_strcpy(element_list, env);
     else
 	sprintf(element_list, "%s/etc/element_list", G_gisbase());



More information about the grass-commit mailing list