From: Sandro Santilli Date: Fri, 30 Sep 2005 08:59:29 +0000 (+0000) Subject: Fixed release of stack memory occurring when shp2pgsql is compiled with USE_ICONV... X-Git-Tag: pgis_1_1_0~229 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=04a5f3105c9cda15f4219c681253f403a3f1db68;p=postgis Fixed release of stack memory occurring when shp2pgsql is compiled with USE_ICONV defined, an attribute value needs to be escaped and no -W is used git-svn-id: http://svn.osgeo.org/postgis/trunk@1949 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/CHANGES b/CHANGES index 9caf90b66..fa2abc6dc 100644 --- a/CHANGES +++ b/CHANGES @@ -22,6 +22,7 @@ PostGIS 1.1.0CVS PostGIS 1.0.5CVS - New "Reporting Bugs" chapter in manual + - Segfault fix in shp2pgsql (utf8 encoding) PostGIS 1.0.4 2005/09/09 diff --git a/loader/shp2pgsql.c b/loader/shp2pgsql.c index a7d9e425c..94ac38473 100644 --- a/loader/shp2pgsql.c +++ b/loader/shp2pgsql.c @@ -192,7 +192,7 @@ make_good_string(char *str) *optr='\0'; #ifdef USE_ICONV - free(str); + if ( encoding ) free(str); #endif return result; @@ -245,7 +245,7 @@ protect_quotes_string(char *str) *optr='\0'; #ifdef USE_ICONV - free(str); + if ( encoding ) free(str); #endif return result; @@ -1663,6 +1663,9 @@ utf8 (const char *fromcode, char *inputbuf) /********************************************************************** * $Log$ + * Revision 1.97 2005/09/30 08:59:29 strk + * Fixed release of stack memory occurring when shp2pgsql is compiled with USE_ICONV defined, an attribute value needs to be escaped and no -W is used + * * Revision 1.96 2005/08/29 22:36:25 strk * Removed premature object destruction in InsertLineString{WKT,} causing segfault *