From: Paul Ramsey Date: Tue, 4 Feb 2003 22:57:44 +0000 (+0000) Subject: Fix memory management error, array of pointers allocated insufficient space. X-Git-Tag: pgis_0_7_4~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=585bd29bbf954d5f53e72b77c3232d6c9f24d537;p=postgis Fix memory management error, array of pointers allocated insufficient space. git-svn-id: http://svn.osgeo.org/postgis/trunk@237 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/loader/shp2pgsql.c b/loader/shp2pgsql.c index da0dfe0b4..de2d3db40 100644 --- a/loader/shp2pgsql.c +++ b/loader/shp2pgsql.c @@ -4,6 +4,9 @@ * Author: Jeff Lounsbury, jeffloun@refractions.net * * $Log$ + * Revision 1.29 2003/02/04 22:57:44 pramsey + * Fix memory management error, array of pointers allocated insufficient space. + * * Revision 1.28 2003/02/04 21:39:20 pramsey * Added CVS substitution strings for logging. * @@ -552,7 +555,7 @@ int main (int ARGC, char **ARGV){ num_fields = DBFGetFieldCount( hDBFHandle ); num_records = DBFGetRecordCount(hDBFHandle); - names = malloc(num_fields +1); + names = malloc((num_fields + 1)*sizeof(char*)); for(j=0;j