[GRASS-SVN] r73112 - grass/branches/releasebranch_7_4/raster/r.buffer

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Aug 16 09:26:31 PDT 2018


Author: mmetz
Date: 2018-08-16 09:26:31 -0700 (Thu, 16 Aug 2018)
New Revision: 73112

Modified:
   grass/branches/releasebranch_7_4/raster/r.buffer/distance.h
Log:
r.buffer: fix interger overflow (fixes #3620, backport trunk r73111)

Modified: grass/branches/releasebranch_7_4/raster/r.buffer/distance.h
===================================================================
--- grass/branches/releasebranch_7_4/raster/r.buffer/distance.h	2018-08-16 16:25:50 UTC (rev 73111)
+++ grass/branches/releasebranch_7_4/raster/r.buffer/distance.h	2018-08-16 16:26:31 UTC (rev 73112)
@@ -50,7 +50,7 @@
 extern double ns_to_ew_squared;
 extern int count_rows_with_data;
 
-#define MAPINDEX(r,c) (r * window.cols + c)
+#define MAPINDEX(r,c) ((size_t)(r) * window.cols + (c))
 #define ZONE_INCR 2
 
 #define FEET_TO_METERS 0.3048



More information about the grass-commit mailing list