Roppola, Antti - BRS wrote:
Hi all,
We're in the process of upgrading from 4.8.1 to 4.10.2 and we are seeing segfaults when using PostGIS layers. I've had a look through the bug tracker and source, the main difference between msPOSTGISLayerRetrievePK() between 4.8.1 and 4.10.2 appears
to be the following (mappostgis.c revisions 1.66 to 1.77):

Antti,

yes, this looks indeed like a bug in msPOSTGISLayerRetrievePK to me. I've had a look at the code and I could spot line 1770 of mappostgis.c (Mapserver 4.10.1, line number might vary slightly in other versions) which doesn't really look very effective:

      length = (int)pos_sep + strlen(pos_sep);

Casting a pointer into an int doesn't seem to make any sense here. I'd suggest you change that line to

      length = strlen(pos_sep);

recompile and try again.

Best regards,
--
--------------------------------------------------------------------
Andreas Albarello
Analysis & SW Development

Territorium Online srl/GmbH
Via Buozzi/Buozzistraße 12 - I 39100 Bolzano/Bozen
email: [EMAIL PROTECTED]
web:   www.territoriumonline.com
--------------------------------------------------------------------

Reply via email to