Преглед на файлове

r.horizon: check if coordinates are within the current region, fixes https://trac.osgeo.org/grass/ticket/3634

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@73219 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz преди 6 години
родител
ревизия
deb9b44268
променени са 1 файла, в които са добавени 5 реда и са изтрити 0 реда
  1. 5 0
      raster/r.horizon/main.c

+ 5 - 0
raster/r.horizon/main.c

@@ -367,6 +367,11 @@ int main(int argc, char *argv[])
 		_("Can't read the coordinates from the \"coordinate\" option."));
 	}
 
+	if (xcoord < cellhd.west || xcoord >= cellhd.east ||
+	    ycoord <= cellhd.south || ycoord > cellhd.north) {
+	    G_fatal_error(_("Coordinates are outside of the current region"));
+	}
+
 	/* Transform the coordinates to row/column */
 
 	/*