[postgis-tickets] [PostGIS] #5005: ST_FlatGeoBuf crashes on tables when geometry column is not the first column

PostGIS trac at osgeo.org
Mon Oct 25 21:42:31 PDT 2021


#5005: ST_FlatGeoBuf crashes on tables when geometry column is not the first
column
-----------------------+---------------------------
  Reporter:  robe      |      Owner:  pramsey
      Type:  defect    |     Status:  new
  Priority:  critical  |  Milestone:  PostGIS 3.2.0
 Component:  postgis   |    Version:  master
Resolution:            |   Keywords:
-----------------------+---------------------------

Comment (by chodgson):

 Hey I don't have a source checkout or time to test this at the moment, but
 it looks to me like the problem is that the ctx->geom_index is used in
 flatgeobuf_agg_transfn() before it is ever initialized properly - it is
 initialized to 0 in flatgeobuf_agg_ctx_init() but it is set based on the
 actual data types of the tuple and/or the specified geom column name in
 encode_header() - which is called after geom_index is used in transfn() .

 It looks like encode_header() should just be called at the end of the
 init? Instead of conditionally in the transfn/finalfn?

 Hope that helps.

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