]> granicus.if.org Git - postgis/commitdiff
Fixed release of stack memory occurring when shp2pgsql is compiled with USE_ICONV...
authorSandro Santilli <strk@keybit.net>
Fri, 30 Sep 2005 08:59:29 +0000 (08:59 +0000)
committerSandro Santilli <strk@keybit.net>
Fri, 30 Sep 2005 08:59:29 +0000 (08:59 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@1949 b70326c6-7e19-0410-871a-916f4a2858ee

CHANGES
loader/shp2pgsql.c

diff --git a/CHANGES b/CHANGES
index 9caf90b66742000ec464a454f41a60173ee0a86f..fa2abc6dc5651c12288137d57233847944bb18ed 100644 (file)
--- 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
index a7d9e425cc31f944d6790a15a9ca52fcd7d7358c..94ac38473a054394f059742ba48f464048e61830 100644 (file)
@@ -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
  *