[GRASS-SVN] r73002 - grass/trunk/vector/v.in.ogr

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jul 24 01:07:12 PDT 2018


Author: mmetz
Date: 2018-07-24 01:07:12 -0700 (Tue, 24 Jul 2018)
New Revision: 73002

Modified:
   grass/trunk/vector/v.in.ogr/main.c
Log:
v.in.ogr: fix segfault with wrong array index

Modified: grass/trunk/vector/v.in.ogr/main.c
===================================================================
--- grass/trunk/vector/v.in.ogr/main.c	2018-07-21 09:32:15 UTC (rev 73001)
+++ grass/trunk/vector/v.in.ogr/main.c	2018-07-24 08:07:12 UTC (rev 73002)
@@ -760,10 +760,10 @@
 	feature_count = 0;
 
 	ogr_feature_count = 0;
-	if (n_features[layer_id] == 0)
+	if (n_features[layer] == 0)
 	    ogr_feature_count = OGR_L_GetFeatureCount(Ogr_layer, 1);
 	if (ogr_feature_count > 0)
-	    n_features[layer_id] = ogr_feature_count;
+	    n_features[layer] = ogr_feature_count;
 
 	/* count polygons and isles */
 	G_message(_("Check if OGR layer <%s> contains polygons..."),



More information about the grass-commit mailing list