[GRASS-SVN] r48461 - grass/branches/develbranch_6/raster/r.carve

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Sep 25 08:09:31 EDT 2011


Author: hamish
Date: 2011-09-25 05:09:31 -0700 (Sun, 25 Sep 2011)
New Revision: 48461

Modified:
   grass/branches/develbranch_6/raster/r.carve/support.c
Log:
don't segfault on long map names (#800)

Modified: grass/branches/develbranch_6/raster/r.carve/support.c
===================================================================
--- grass/branches/develbranch_6/raster/r.carve/support.c	2011-09-25 11:50:34 UTC (rev 48460)
+++ grass/branches/develbranch_6/raster/r.carve/support.c	2011-09-25 12:09:31 UTC (rev 48461)
@@ -38,8 +38,10 @@
     G_short_history(parm->outrast->answer, "raster", &hist);
     sprintf(hist.edhist[0], "%s version %.2f", G_program_name(), APP_VERSION);
     sprintf(hist.edhist[1], "stream width: %.2f", parm->swidth * 2);
-    sprintf(hist.datsrc_1, "raster elevation file: %s", parm->inrast->answer);
-    sprintf(hist.datsrc_2, "vector stream file: %s", parm->invect->answer);
+    G_snprintf(hist.datsrc_1, RECORD_LEN, "raster elevation map: %s",
+		parm->inrast->answer);
+    G_snprintf(hist.datsrc_2, RECORD_LEN, "vector stream map: %s",
+		parm->invect->answer);
     hist.edlinecnt = 2;
     G_command_history(&hist);
 



More information about the grass-commit mailing list