[postgis-users] pgsql2shp segfault by multipolygon export

strk at refractions.net strk at refractions.net
Fri Jul 22 07:11:54 PDT 2005


On Fri, Jul 22, 2005 at 10:04:23PM +0800, ch.grau at uni.de wrote:
> sorry ...
> 
> yoop undefining USE_WKB works fine in postgis-0.9 version
> of pgsql2shp.c

Would you try applying the following patch to your source code ?
Undefining USE_WKB would not solve cases in which you extract
binary features (for example for mapserver).

--strk(patch_follows);

Index: postgis_inout.c
===================================================================
RCS file: /home/cvs/postgis/postgis/Attic/postgis_inout.c,v
retrieving revision 1.45
diff -U2 -r1.45 postgis_inout.c
--- postgis_inout.c     11 Aug 2004 17:07:26 -0000      1.45
+++ postgis_inout.c     22 Jul 2005 14:10:05 -0000
@@ -3873,5 +3873,5 @@
 int getint(char *c)
 {
-       int i;
+       int i=0;
        memcpy( &i, c, 4);
        return i;
@@ -3881,5 +3881,5 @@
 double getdouble(char *c)
 {
-       double d;
+       double d=0.0;
        memcpy( &d, c, 8);
        return d;




More information about the postgis-users mailing list