[postgis-tickets] [PostGIS] #3436: Memory mistake in ptarray_clone_deep
PostGIS
trac at osgeo.org
Tue Jan 19 09:04:56 PST 2016
#3436: Memory mistake in ptarray_clone_deep
---------------------+---------------------------
Reporter: pramsey | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.2.2
Component: postgis | Version: 2.2.x
Keywords: |
---------------------+---------------------------
The clone sets the npoints and maxpoints of the output to match the input,
but only allocates npoints worth of space. So if points are added to the
clone after the operation, Bad Things Happen.
{{{
SELECT ST_GeomFromKML('<MultiGeometry>
<Polygon>
<outerBoundaryIs>
<LinearRing>
<coordinates>121.50835,22.632916 121.508331,22.63293 121.50828,22.632937
121.508257,22.632941 121.508231,22.632968 121.508207,22.63298
121.508174,22.632989 121.508131,22.63298 121.508091,22.632967
121.508055,22.632928 121.508007,22.632852 121.507976,22.632741
121.507979,22.632604 121.50799,22.632572 121.508011,22.632542
121.508144,22.632436 121.508168,22.632427 121.508192,22.632425
121.508219,22.632427 121.508237,22.632436 121.508329,22.632537
121.508334,22.63256 121.508324,22.632578 121.508254,22.632632
121.508239,22.632652 121.508232,22.632677 121.508214,22.63272
121.508193,22.632725 121.508153,22.632723 121.508114,22.632732
121.508095,22.63275 121.508091,22.632773 121.508095,22.632791
121.508112,22.632813 121.508141,22.632833 121.508185,22.632842
121.508226,22.632835 121.508308,22.632806 121.508344,22.632808
121.50837,22.632819 121.508386,22.632835 121.508391,22.632862
</coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
</MultiGeometry>');
}}}
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3436>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list