Opened 20 years ago
Closed 20 years ago
#604 closed defect (fixed)
Dangling pointers in layerinfo (mappostgis.c, msPOSTGISLayerOpen())
Reported by: | Owned by: | refractions | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | PostGIS Interface | Version: | 3.6 |
Severity: | normal | Keywords: | |
Cc: | frank.koormann@… |
Description
Hi, 3.6.7 tarball version contains a severe bug in the PostGIS Interface: Opening a layer with msPOSTGISLayerOpen() not all pointers of the layerinfo struct are initialised properly. This seems to be done usually later (e.g. in prepDB) but in combination with maplab (queries) I encountered situations where msPOSTGISLayerClose() is called before all pointers are well initialised. Especially layerinfo->urid_name is a dangling pointer, the NULL check fails and the following free causes a segfault. Thus is fixed in 4.x series, however the attached patch might be of some use for 3.6.7 users. Frank
Attachments (1)
Change History (2)
by , 20 years ago
Attachment: | ms3.6.7_mappostgis.patch added |
---|
comment:1 by , 20 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Summary: | Dangling pointers in layerinfo (mappostgis.c, msPOSTGISLayerOpen()) → Dangling pointers in layerinfo (mappostgis.c, msPOSTGISLayerOpen()) |
We are unlikely to ever release another 3.6.x version, but I have applied your patch (untested) to the 3.6.x branch anyway so that we can close this bug (and in case anyone gets that version from CVS).
Note:
See TracTickets
for help on using tickets.
Patch fixes bug #604