Browse Source

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).


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@68112 15284696-431f-4ddb-bdfa-cd5b030d7da7
Vaclav Petras 9 years ago
parent
commit
b1718299d1
1 changed files with 0 additions and 1 deletions
  1. 0 1
      vector/v.vol.rst/user3.c

+ 0 - 1
vector/v.vol.rst/user3.c

@@ -495,7 +495,6 @@ COGRR1(double x_or, double y_or, double z_or, int n_rows, int n_cols,
 			if ((cellinp != NULL) && (cellout != NULL) &&
 			    (i == ngstl))
 			    wwcell = hcell + wmin;
-			A[l] = h;
 			az[l] = ww;
 			if (first_time_z) {
 			    first_time_z = 0;