[postgis-tickets] [PostGIS] #4791: segfault in ST_Square

PostGIS trac at osgeo.org
Sun Nov 15 15:35:17 PST 2020


#4791: segfault in ST_Square
-------------------------------------------------+-------------------------
 Reporter:  tobwen                               |      Owner:  pramsey
     Type:  defect                               |     Status:  new
 Priority:  critical                             |  Milestone:  PostGIS
                                                 |  3.0.3
Component:  postgis                              |    Version:  3.0.x
 Keywords:  ST_Square, segfault, segmentation    |
  fault                                          |
-------------------------------------------------+-------------------------
 == bug
 I've written a small snippet to create single gridcells. After execution,
 PG's backend segfaults.

 == fix
 ''RhodiumToad'' on ''Freenode'' helped me to debug it. Here's his result:

 postgis/lwgeom_generate_grid.c: line 420, the PG_FREE_IF_COPY has a
 parameter number of 1, which is not the parameter the value came from,
 which is 3

 so it tries to free something incorrectly and dies

 == affected versions
 Seems like all 3.x versions are affected.

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4791>
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