[GRASS-SVN] r34174 - grass/trunk/general/manage/lib
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Nov 7 02:31:34 EST 2008
Author: glynn
Date: 2008-11-07 02:31:31 -0500 (Fri, 07 Nov 2008)
New Revision: 34174
Modified:
grass/trunk/general/manage/lib/read_list.c
Log:
Fix size of ELEMENT_LIST pathname buffer
Modified: grass/trunk/general/manage/lib/read_list.c
===================================================================
--- grass/trunk/general/manage/lib/read_list.c 2008-11-07 00:45:22 UTC (rev 34173)
+++ grass/trunk/general/manage/lib/read_list.c 2008-11-07 07:31:31 UTC (rev 34174)
@@ -25,7 +25,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];
@@ -39,7 +39,8 @@
list = 0;
any = 0;
- if ((env = G__getenv("ELEMENT_LIST")))
+ env = getenv("ELEMENT_LIST");
+ if (env)
strcpy(element_list, env);
else
sprintf(element_list, "%s/etc/element_list", G_gisbase());
More information about the grass-commit
mailing list