]> granicus.if.org Git - postgis/commitdiff
Applied patch from Ron Mayer fixing a segfault in string escaper funx
authorSandro Santilli <strk@keybit.net>
Thu, 21 Apr 2005 09:07:41 +0000 (09:07 +0000)
committerSandro Santilli <strk@keybit.net>
Thu, 21 Apr 2005 09:07:41 +0000 (09:07 +0000)
git-svn-id: http://svn.osgeo.org/postgis/branches/pgis_1_0@1661 b70326c6-7e19-0410-871a-916f4a2858ee

loader/shp2pgsql.c

index 6a9dc3185df9c792a38422b794dc8973a2b343c5..b9b4c2c751d0dc3ab9a678a95f8a9036ab1e9e49 100644 (file)
@@ -172,7 +172,7 @@ make_good_string(char *str)
 
        if (toescape == 0) return str;
 
-       size = ptr-str+toescape;
+       size = ptr-str+toescape+1;
 
        result = calloc(1, size);
 
@@ -225,7 +225,7 @@ protect_quotes_string(char *str)
 
        if (toescape == 0) return str;
        
-       size = ptr-str+toescape;
+       size = ptr-str+toescape+1;
 
        result = calloc(1, size);
 
@@ -1615,6 +1615,9 @@ utf8 (const char *fromcode, char *inputbuf)
 
 /**********************************************************************
  * $Log$
+ * Revision 1.88.2.1  2005/04/21 09:07:41  strk
+ * Applied patch from Ron Mayer fixing a segfault in string escaper funx
+ *
  * Revision 1.88  2005/04/14 12:58:59  strk
  * Applied patch by Gino Lucrezi fixing bug in string escaping code.
  *