[postgis-tickets] r14477 - #3389, buffer overflow in lwgeom_to_geojson
Daniel Baston
dbaston at gmail.com
Thu Dec 3 16:11:26 PST 2015
Author: dbaston
Date: 2015-12-03 16:11:26 -0800 (Thu, 03 Dec 2015)
New Revision: 14477
Modified:
branches/2.0/liblwgeom/lwout_geojson.c
Log:
#3389, buffer overflow in lwgeom_to_geojson
Modified: branches/2.0/liblwgeom/lwout_geojson.c
===================================================================
--- branches/2.0/liblwgeom/lwout_geojson.c 2015-12-04 00:07:45 UTC (rev 14476)
+++ branches/2.0/liblwgeom/lwout_geojson.c 2015-12-04 00:11:26 UTC (rev 14477)
@@ -261,7 +261,7 @@
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; i<poly->nrings; i++)
+ for (i=0; i<poly->nrings; i++)
{
size += pointArray_geojson_size(poly->rings[i], precision);
size += sizeof("[]");
More information about the postgis-tickets
mailing list