[GRASS-SVN] r36866 - grass/branches/develbranch_6/raster/r.colors

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Apr 22 08:00:35 EDT 2009


Author: hamish
Date: 2009-04-22 08:00:34 -0400 (Wed, 22 Apr 2009)
New Revision: 36866

Modified:
   grass/branches/develbranch_6/raster/r.colors/stats.c
Log:
Add extra element to array to prevent max. value overrunning (Glynn; merge from trunk)

Modified: grass/branches/develbranch_6/raster/r.colors/stats.c
===================================================================
--- grass/branches/develbranch_6/raster/r.colors/stats.c	2009-04-22 11:58:24 UTC (rev 36865)
+++ grass/branches/develbranch_6/raster/r.colors/stats.c	2009-04-22 12:00:34 UTC (rev 36866)
@@ -101,7 +101,7 @@
     statf->count = 1000;
     statf->min = min;
     statf->max = max;
-    statf->stats = G_calloc(statf->count, sizeof(unsigned long));
+    statf->stats = G_calloc(statf->count + 1, sizeof(unsigned long));
     statf->total = 0;
 
     G_verbose_message(_("Reading raster map <%s>..."),



More information about the grass-commit mailing list