[GRASS-SVN] r34609 - grass/trunk/vector/v.in.ascii

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Nov 28 19:37:11 EST 2008


Author: hamish
Date: 2008-11-28 19:37:11 -0500 (Fri, 28 Nov 2008)
New Revision: 34609

Modified:
   grass/trunk/vector/v.in.ascii/main.c
Log:
Column numbers must not be negative (trac #278, merge from devbr6)

Modified: grass/trunk/vector/v.in.ascii/main.c
===================================================================
--- grass/trunk/vector/v.in.ascii/main.c	2008-11-29 00:34:25 UTC (rev 34608)
+++ grass/trunk/vector/v.in.ascii/main.c	2008-11-29 00:37:11 UTC (rev 34609)
@@ -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