[PostGIS] #5921: pfree of NULL in gserialized_sel_internal()
PostGIS
trac at osgeo.org
Fri May 30 14:10:52 PDT 2025
#5921: pfree of NULL in gserialized_sel_internal()
---------------------------+---------------------------
Reporter: arseniymukhin | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 3.5.4
Component: postgis | Version: master
Keywords: |
---------------------------+---------------------------
Hi,
The current code doesn't check if nd_stat is NULL before pfree, which can
result in segfault. I caught segfault while executing a query on freshly
restored data from dump with statistics. Postgres 18 new feature -
export/import statistics, let you dump statistics, but it does not
transfer statistics with custom stakind, so nd_stat in
gserialized_sel_internal() can be NULL.
Please find the attached patch fixing this.
Best regards,
Arseniy Mukhin
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5921>
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