[GRASS-SVN] r73488 - grass/trunk/raster/r.li/r.li.daemon

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Oct 6 14:20:35 PDT 2018


Author: mmetz
Date: 2018-10-06 14:20:35 -0700 (Sat, 06 Oct 2018)
New Revision: 73488

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

Modified: grass/trunk/raster/r.li/r.li.daemon/daemon.c
===================================================================
--- grass/trunk/raster/r.li/r.li.daemon/daemon.c	2018-10-04 22:51:23 UTC (rev 73487)
+++ grass/trunk/raster/r.li/r.li.daemon/daemon.c	2018-10-06 21:20:35 UTC (rev 73488)
@@ -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