[GRASS-SVN] r34608 - grass/branches/develbranch_6/vector/v.in.ascii
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Nov 28 19:34:25 EST 2008
Author: hamish
Date: 2008-11-28 19:34:25 -0500 (Fri, 28 Nov 2008)
New Revision: 34608
Modified:
grass/branches/develbranch_6/vector/v.in.ascii/in.c
Log:
Column numbers must not be negative (trac #278)
Modified: grass/branches/develbranch_6/vector/v.in.ascii/in.c
===================================================================
--- grass/branches/develbranch_6/vector/v.in.ascii/in.c 2008-11-28 23:04:15 UTC (rev 34607)
+++ grass/branches/develbranch_6/vector/v.in.ascii/in.c 2008-11-29 00:34:25 UTC (rev 34608)
@@ -193,6 +193,9 @@
catcol = atoi(catcol_opt->answer) - 1;
+ if (xcol+1 < 1 || ycol+1 < 1 || zcol+1 < 0 || catcol+1 < 0)
+ G_fatal_error(_("Column numbers must not be negative"));
+
if (old->answer != NULL) {
if ((ascii = fopen(old->answer, "r")) == NULL) {
G_fatal_error(_("Unable to open ASCII file <%s>"), old->answer);
More information about the grass-commit
mailing list