[GRASS-SVN] r73489 - grass/branches/releasebranch_7_6/raster/r.li/r.li.daemon

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Oct 6 14:21:18 PDT 2018


Author: mmetz
Date: 2018-10-06 14:21:18 -0700 (Sat, 06 Oct 2018)
New Revision: 73489

Modified:
   grass/branches/releasebranch_7_6/raster/r.li/r.li.daemon/daemon.c
Log:
r.li: fix segfault in r.li.shannon (see #3676, backport trunk r73488)

Modified: grass/branches/releasebranch_7_6/raster/r.li/r.li.daemon/daemon.c
===================================================================
--- grass/branches/releasebranch_7_6/raster/r.li/r.li.daemon/daemon.c	2018-10-06 21:20:35 UTC (rev 73488)
+++ grass/branches/releasebranch_7_6/raster/r.li/r.li.daemon/daemon.c	2018-10-06 21:21:18 UTC (rev 73489)
@@ -740,8 +740,12 @@
 
     Rast_set_d_null_value(cell_buf, Rast_window_cols() + 1);
 
-    for (i = 0; i < Rast_window_rows() - g->sf_y - g->rows; i++)
+    for (i = 0; i < Rast_window_rows() - g->sf_y - ((int)g->rl / 2) - g->rows; i++) {
 	Rast_put_row(mv_fd, cell_buf, DCELL_TYPE);
+    }
 
+    G_free(file_buf);
+    G_free(cell_buf);
+
     return 1;
 }



More information about the grass-commit mailing list