[GRASS-SVN] r58748 - grass/trunk/lib/gmath
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jan 20 10:01:05 PST 2014
Author: huhabla
Date: 2014-01-20 10:01:04 -0800 (Mon, 20 Jan 2014)
New Revision: 58748
Modified:
grass/trunk/lib/gmath/la.c
Log:
Fixed wrong memory allocation, detected and reported by Eva Stopkova.
Modified: grass/trunk/lib/gmath/la.c
===================================================================
--- grass/trunk/lib/gmath/la.c 2014-01-20 17:48:45 UTC (rev 58747)
+++ grass/trunk/lib/gmath/la.c 2014-01-20 18:01:04 UTC (rev 58748)
@@ -483,7 +483,7 @@
integer *perm, res_info;
integer num_eqns, nrhs, lda, ldb;
- perm = (integer *) G_malloc(wmat->rows);
+ perm = (integer *) G_malloc(wmat->rows * sizeof(integer));
/* Set fields to pass to fortran routine */
num_eqns = (integer) mt1->rows;
More information about the grass-commit
mailing list