From f79b7867eefebb217be6a57167ad926628a6df4f Mon Sep 17 00:00:00 2001 From: Daniel Baston Date: Thu, 3 Dec 2015 23:48:04 +0000 Subject: [PATCH] #3389, buffer overflow in lwgeom_to_geojson git-svn-id: http://svn.osgeo.org/postgis/trunk@14474 b70326c6-7e19-0410-871a-916f4a2858ee --- liblwgeom/lwout_geojson.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liblwgeom/lwout_geojson.c b/liblwgeom/lwout_geojson.c index ca4cbfacf..7e467f09e 100644 --- a/liblwgeom/lwout_geojson.c +++ b/liblwgeom/lwout_geojson.c @@ -259,7 +259,7 @@ asgeojson_poly_size(const LWPOLY *poly, char *srs, GBOX *bbox, int precision) if (srs) size += asgeojson_srs_size(srs); if (bbox) size += asgeojson_bbox_size(FLAGS_GET_Z(poly->flags), precision); size += sizeof("\"coordinates\":["); - for (i=0, size=0; inrings; i++) + for (i=0; inrings; i++) { size += pointArray_geojson_size(poly->rings[i], precision); size += sizeof("[]"); -- 2.40.0