Browse Source

r.resamp.rst: avoid integer overflow, cnt'd

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@55299 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 12 năm trước cách đây
mục cha
commit
a60ea31b99
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      raster/r.resamp.rst/main.c

+ 1 - 1
raster/r.resamp.rst/main.c

@@ -351,7 +351,7 @@ int main(int argc, char *argv[])
     ns_res = outhd.ns_res;
     ns_res = outhd.ns_res;
     nsizc = outhd.cols;
     nsizc = outhd.cols;
     nsizr = outhd.rows;
     nsizr = outhd.rows;
-    disk = nsizc * nsizr * sizeof(int);
+    disk = (off_t)nsizc * nsizr * sizeof(int);
 
 
     az = G_alloc_vector(nsizc + 1);
     az = G_alloc_vector(nsizc + 1);