[GRASS-SVN] r36867 -
grass/branches/releasebranch_6_4/raster/r.colors
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Apr 22 08:02:35 EDT 2009
Author: hamish
Date: 2009-04-22 08:02:35 -0400 (Wed, 22 Apr 2009)
New Revision: 36867
Modified:
grass/branches/releasebranch_6_4/raster/r.colors/stats.c
Log:
Add extra element to array to prevent max. value overrunning (Glynn; merge from trunk)
Modified: grass/branches/releasebranch_6_4/raster/r.colors/stats.c
===================================================================
--- grass/branches/releasebranch_6_4/raster/r.colors/stats.c 2009-04-22 12:00:34 UTC (rev 36866)
+++ grass/branches/releasebranch_6_4/raster/r.colors/stats.c 2009-04-22 12:02:35 UTC (rev 36867)
@@ -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