From: Sandro Santilli Date: Fri, 12 Dec 2003 14:39:04 +0000 (+0000) Subject: Fixed a bug in make_line allocating less memory then required X-Git-Tag: pgis_0_8_1~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b598e0cb679bfbc63b7035952d3b9d93a505dfcf;p=postgis Fixed a bug in make_line allocating less memory then required git-svn-id: http://svn.osgeo.org/postgis/trunk@409 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/postgis_inout.c b/postgis_inout.c index 2a5664842..b37c2eebb 100644 --- a/postgis_inout.c +++ b/postgis_inout.c @@ -11,6 +11,9 @@ * ********************************************************************** * $Log$ + * Revision 1.34 2003/12/12 14:39:04 strk + * Fixed a bug in make_line allocating less memory then required + * * Revision 1.33 2003/12/12 12:03:30 strk * More debugging output, some code cleanup. * @@ -3272,7 +3275,7 @@ LINE3D *make_line(int npoints, POINT3D *pts, int *size) { LINE3D *result; - *size = sizeof(LINE3D) + (npoints-1)*sizeof(POINT3D); + *size = sizeof(LINE3D) + (npoints)*sizeof(POINT3D); result= (LINE3D *) palloc (*size);