[postgis-tickets] [PostGIS] #4031: ST_CurveToLine with small tolerance sometimes causes invalid memory alloc request size

PostGIS trac at osgeo.org
Tue Apr 24 06:26:50 PDT 2018


#4031: ST_CurveToLine with small tolerance sometimes causes invalid memory alloc
request size
----------------------+----------------------------
  Reporter:  kkgeodk  |      Owner:  strk
      Type:  defect   |     Status:  assigned
  Priority:  medium   |  Milestone:  PostGIS 2.5.0
 Component:  postgis  |    Version:  2.2.x
Resolution:           |   Keywords:  ST_CurveToLine
----------------------+----------------------------

Comment (by strk):

 In [changeset:"16553" 16553]:
 {{{
 #!CommitTicketReference repository="" revision="16553"
 Survive to big max deviation values passed to ST_CurveToLine

 When using "max-deviation" tolerance type, passing a tolerance
 bigger than twice the radius of any arc resulted in entering
 an infinite loop, only limited by availability of RAM.

 This commit fixes the bug by being careful in what's fed to
 acos()...

 Includes a unit test.
 References #4031 for trunk (2.5.0dev) - to be backported
 }}}

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4031#comment:10>
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