[GRASS-SVN] r73111 - grass/trunk/raster/r.buffer

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Aug 16 09:25:50 PDT 2018


Author: mmetz
Date: 2018-08-16 09:25:50 -0700 (Thu, 16 Aug 2018)
New Revision: 73111

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

Modified: grass/trunk/raster/r.buffer/distance.h
===================================================================
--- grass/trunk/raster/r.buffer/distance.h	2018-08-16 16:10:56 UTC (rev 73110)
+++ grass/trunk/raster/r.buffer/distance.h	2018-08-16 16:25:50 UTC (rev 73111)
@@ -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