]> granicus.if.org Git - postgis/commitdiff
Memory allocated for main_scan_query was not enough when using binary cursor. Fixed
authorSandro Santilli <strk@keybit.net>
Wed, 21 Apr 2004 07:38:34 +0000 (07:38 +0000)
committerSandro Santilli <strk@keybit.net>
Wed, 21 Apr 2004 07:38:34 +0000 (07:38 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@505 b70326c6-7e19-0410-871a-916f4a2858ee

loader/pgsql2shp.c

index 9be2e9763823b35fb2f3f9488a57ca73e8f3e127..a4ff706dae8728d71c6a29f78d81e01ae5f22ad4 100644 (file)
@@ -10,6 +10,9 @@
  * 
  **********************************************************************
  * $Log$
+ * Revision 1.46  2004/04/21 07:38:34  strk
+ * Memory allocated for main_scan_query was not enough when using binary cursor. Fixed
+ *
  * Revision 1.45  2004/03/29 10:20:48  strk
  * Fixed a bug in WKB parsing for Multipoints.
  * Fixed a bug in -d handling for WKB.
@@ -2664,7 +2667,7 @@ initialize()
 
        tmpint = strlen(table)+2;
        for (i=0; i<mainscan_nflds; i++)
-               tmpint += strlen(mainscan_flds[i])+2;
+               tmpint += strlen(mainscan_flds[i])+32;
        main_scan_query = (char *)malloc(tmpint+256);
 
        sprintf(main_scan_query, "SELECT ");