[postgis-tickets] [PostGIS] #2185: Geometry output functions crash server with invalid WKT (was: Second WKT parse crashes server)

PostGIS trac at osgeo.org
Wed Jan 23 16:07:33 PST 2013


#2185: Geometry output functions crash server with invalid WKT
---------------------+------------------------------------------------------
 Reporter:  mwtoews  |       Owner:  pramsey      
     Type:  defect   |      Status:  new          
 Priority:  medium   |   Milestone:  PostGIS 2.0.3
Component:  postgis  |     Version:  2.0.x        
 Keywords:           |  
---------------------+------------------------------------------------------

Comment(by mwtoews):

 More testing ...

 There is no crash if explicitly casted:
 {{{
 SELECT ST_AsText('POINT(3 4 hi)'::geometry);
 SELECT ST_AsText('POINT(3 4 hi)'::geometry);
 }}}
 but this does crash on the second statement:
 {{{
 SELECT ST_AsText('POINT(3 4 hi)'::text);
 SELECT ST_AsText('POINT(3 4 hi)'::text);
 }}}

 Going through the other output functions with the template:
 {{{
 SELECT <ST_function>('POINT(3 4 hi)'::text);
 SELECT <ST_function>('POINT(3 4 hi)'::text);
 }}}
 Here are the results:
  * ST_AsBinary - good
  * ST_AsEWKB - good
  * ST_AsEWKT - crash
  * ST_AsGeoJSON - crash
  * ST_AsGML - crash
  * ST_AsHEXEWKB - good
  * ST_AsKML - crash
  * ST_AsSVG - crash
  * ST_AsX3D - good
  * ST_GeoHash - good
  * ST_AsText - crash
  * ST_AsLatLonText - good

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2185#comment:2>
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