[GRASS-SVN] r68112 - grass/trunk/vector/v.vol.rst

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Mar 22 20:55:15 PDT 2016


Author: wenzeslaus
Date: 2016-03-22 20:55:14 -0700 (Tue, 22 Mar 2016)
New Revision: 68112

Modified:
   grass/trunk/vector/v.vol.rst/user3.c
Log:
v.vol.rst: remove unused write to array

Causes segfaut when number of points is much smaller
then number of columns (valgrind: invalid write of
size 8).

Is seems that A is not used anymore in these loops
and for next run it is initialized again.

The index used is completely out of range
(number of columns versus number of points).


Modified: grass/trunk/vector/v.vol.rst/user3.c
===================================================================
--- grass/trunk/vector/v.vol.rst/user3.c	2016-03-22 20:20:27 UTC (rev 68111)
+++ grass/trunk/vector/v.vol.rst/user3.c	2016-03-23 03:55:14 UTC (rev 68112)
@@ -495,7 +495,6 @@
 			if ((cellinp != NULL) && (cellout != NULL) &&
 			    (i == ngstl))
 			    wwcell = hcell + wmin;
-			A[l] = h;
 			az[l] = ww;
 			if (first_time_z) {
 			    first_time_z = 0;



More information about the grass-commit mailing list