This is an automated email from the git hooks/post-receive script. markus_wanner-guest pushed a commit to branch master in repository postgis.
commit 90d363661ac979aa47e23af3cc79c40677262945 Author: Markus Wanner <[email protected]> Date: Mon Mar 30 19:06:59 2015 +0200 Imported Upstream version 2.1.7+dfsg --- ChangeLog | 50 ++++++++++++++++ NEWS | 11 ++++ README.postgis | 4 +- Version.config | 2 +- aclocal.m4 | 6 +- configure | 6 -- configure.ac | 1 - doc/release_notes.xml | 16 ++++- extensions/postgis/postgis.control | 2 +- .../postgis_tiger_geocoder.control | 2 +- .../postgis_topology/postgis_topology.control | 2 +- extensions/upgradeable_versions.mk | 6 +- liblwgeom/liblwgeom.h.in | 6 +- liblwgeom/lwin_geojson.c | 68 ++++++++++++++-------- liblwgeom/lwutil.c | 20 ------- libtool | 4 +- postgis/lwgeom_box.c | 8 +-- postgis/sqldefines.h | 8 +-- postgis_svn_revision.h | 2 +- raster/rt_pg/rt_pg.c | 22 ++++--- raster/test/regress/rt_dumpvalues.sql | 13 ++++- 21 files changed, 167 insertions(+), 92 deletions(-) diff --git a/ChangeLog b/ChangeLog index f51ad77..8044365 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,53 @@ +2015-03-27 17:21 pramsey + + * liblwgeom/lwin_geojson.c: Formatting + +2015-03-27 16:26 pramsey + + * liblwgeom/lwin_geojson.c: Fix z+ handling + +2015-03-26 22:29 pramsey + + * liblwgeom/lwin_geojson.c: GeoJSON maintenance + +2015-03-24 13:39 dustymugs + + * raster/rt_pg/rt_pg.c: invalid operator. Ticket #3090 + +2015-03-24 13:32 dustymugs + + * NEWS, raster/rt_pg/rt_pg.c, + raster/test/regress/rt_dumpvalues.sql: Fix ST_DumpValues() + crasher when cleaning. Ticket #3086 + +2015-03-23 16:34 strk + + * NEWS, configure.ac, liblwgeom/liblwgeom.h.in, liblwgeom/lwutil.c, + postgis/lwgeom_box.c: Do not (re)define strcasestr in a public + header (#3088) + +2015-03-20 17:11 pramsey + + * HOWTO_RELEASE: Add notes on updateing trunk too + +2015-03-20 17:08 pramsey + + * HOWTO_RELEASE, extensions/upgradeable_versions.mk, + java/jdbc_jtsparser/pom.xml: Push versions forward + +2015-03-20 17:01 pramsey + + * NEWS, Version.config: Set versions for 2.1.7dev + +2015-03-20 17:00 pramsey + + * NEWS, README.postgis, Version.config, doc/release_notes.xml: + Setup for 2.1.6 release + +2015-03-20 16:45 pramsey + + * ChangeLog: update changelog + 2015-03-20 15:50 pramsey * NEWS: Update NEWs diff --git a/NEWS b/NEWS index 72d1b23..a88b42f 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,14 @@ +PostGIS 2.1.7 +2015/03/30 + + * Bug Fixes * + + - #3086, ST_DumpValues() crashes backend on cleanup with invalid + band indexes + - #3088, Do not (re)define strcasestr in a liblwgeom.h + - #3094, Malformed GeoJSON inputs crash backend + + PostGIS 2.1.6 2015/03/20 diff --git a/README.postgis b/README.postgis index 20f416f..08501dd 100644 --- a/README.postgis +++ b/README.postgis @@ -1,8 +1,8 @@ PostGIS - Geographic Information Systems Extensions to PostgreSQL ================================================================= -:Version: 2.1.6 -:Date: 2015-03-20 +:Version: 2.1.7 +:Date: 2015-03-30 :Website: http://postgis.net This distribution contains a module which implements GIS simple features, ties diff --git a/Version.config b/Version.config index 88a4adc..4beb12b 100644 --- a/Version.config +++ b/Version.config @@ -5,5 +5,5 @@ POSTGIS_MAJOR_VERSION=2 POSTGIS_MINOR_VERSION=1 -POSTGIS_MICRO_VERSION=6 +POSTGIS_MICRO_VERSION=7 diff --git a/aclocal.m4 b/aclocal.m4 index cc18be7..c437d77 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.14.1 -*- Autoconf -*- +# generated automatically by aclocal 1.15 -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -12,7 +12,7 @@ # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) -# Copyright (C) 2003-2013 Free Software Foundation, Inc. +# Copyright (C) 2003-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/configure b/configure index 2a68b7b..120a9d0 100755 --- a/configure +++ b/configure @@ -16278,12 +16278,6 @@ fi $as_echo "#define HAVE_ASPRINTF 1" >>confdefs.h -ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr" -if test "x$ac_cv_func_strcasestr" = xyes; then : - $as_echo "#define HAVE_STRCASESTR 1" >>confdefs.h - -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } if ${ac_cv_sys_largefile_source+:} false; then : diff --git a/configure.ac b/configure.ac index bb45ff6..88c7658 100644 --- a/configure.ac +++ b/configure.ac @@ -116,7 +116,6 @@ AC_CHECK_FUNC(vasprintf, [HAVE_VASPRINTF=1], [HAVE_VASPRINTF=0]) AC_DEFINE([HAVE_VASPRINTF]) AC_CHECK_FUNC(asprintf, [HAVE_ASPRINTF=1], [HAVE_ASPRINTF=0]) AC_DEFINE([HAVE_ASPRINTF]) -AC_CHECK_FUNC(strcasestr, AC_DEFINE([HAVE_STRCASESTR])) AC_FUNC_FSEEKO() dnl diff --git a/doc/release_notes.xml b/doc/release_notes.xml index fa2b304..63e19c7 100644 --- a/doc/release_notes.xml +++ b/doc/release_notes.xml @@ -4,8 +4,20 @@ <subtitle>Release Notes</subtitle> <sect1> - <title>Release 2.1.5</title> - <para>Release date: 2014-12-18</para> + <title>Release 2.1.7</title> + <para>Release date: 2015-03-30</para> + <para>This is a critical bug fix release.</para> + <simplesect> + <title>Bug Fixes</title> + <para>#3086, ST_DumpValues() crashes backend on cleanup with invalid band indexes</para> + <para>#3088, Do not (re)define strcasestr in a liblwgeom.h</para> + <para>#3094, Malformed GeoJSON inputs crash backend</para> + </simplesect> + </sect1> + + <sect1> + <title>Release 2.1.6</title> + <para>Release date: 2015-03-20</para> <para>This is a bug fix and performance improvement release.</para> <simplesect> <title>Enhancements</title> diff --git a/extensions/postgis/postgis.control b/extensions/postgis/postgis.control index ad8d257..a25e0d5 100644 --- a/extensions/postgis/postgis.control +++ b/extensions/postgis/postgis.control @@ -1,5 +1,5 @@ # postgis extension comment = 'PostGIS geometry, geography, and raster spatial types and functions' -default_version = '2.1.6' +default_version = '2.1.7' module_pathname = '$libdir/postgis-2.1' relocatable = true diff --git a/extensions/postgis_tiger_geocoder/postgis_tiger_geocoder.control b/extensions/postgis_tiger_geocoder/postgis_tiger_geocoder.control index 1732904..7b4efac 100644 --- a/extensions/postgis_tiger_geocoder/postgis_tiger_geocoder.control +++ b/extensions/postgis_tiger_geocoder/postgis_tiger_geocoder.control @@ -1,6 +1,6 @@ # postgis tiger geocoder extension comment = 'PostGIS tiger geocoder and reverse geocoder' -default_version = '2.1.6' +default_version = '2.1.7' relocatable = false schema = tiger requires = 'postgis,fuzzystrmatch' diff --git a/extensions/postgis_topology/postgis_topology.control b/extensions/postgis_topology/postgis_topology.control index 9f8dc2c..02107f5 100644 --- a/extensions/postgis_topology/postgis_topology.control +++ b/extensions/postgis_topology/postgis_topology.control @@ -1,6 +1,6 @@ # postgis topology extension comment = 'PostGIS topology spatial types and functions' -default_version = '2.1.6' +default_version = '2.1.7' relocatable = false schema = topology requires = postgis diff --git a/extensions/upgradeable_versions.mk b/extensions/upgradeable_versions.mk index 24da730..a7d1929 100644 --- a/extensions/upgradeable_versions.mk +++ b/extensions/upgradeable_versions.mk @@ -14,7 +14,8 @@ UPGRADEABLE_VERSIONS = \ 2.1.2 \ 2.1.3 \ 2.1.4 \ - 2.1.5 + 2.1.5 \ + 2.1.6 UPGRADEABLE_VERSIONS_MINOR = \ 2.0.0 \ @@ -34,4 +35,5 @@ UPGRADEABLE_VERSIONS_PATCH = \ 2.1.2 \ 2.1.3 \ 2.1.4 \ - 2.1.5 + 2.1.5 \ + 2.1.6 diff --git a/liblwgeom/liblwgeom.h.in b/liblwgeom/liblwgeom.h.in index 446ea65..8a9d43d 100644 --- a/liblwgeom/liblwgeom.h.in +++ b/liblwgeom/liblwgeom.h.in @@ -1,5 +1,5 @@ /********************************************************************** - * $Id: liblwgeom.h.in 13367 2015-03-20 13:53:44Z pramsey $ + * $Id: liblwgeom.h.in 13391 2015-03-23 16:34:30Z strk $ * * PostGIS - Spatial Types for PostgreSQL * @@ -1842,10 +1842,6 @@ extern void lwfree(void *mem); /* Utilities */ extern char *lwmessage_truncate(char *str, int startpos, int endpos, int maxlength, int truncdirection); -#ifndef HAVE_STRCASESTR -extern char *strcasestr(const char *s, const char *find); -#endif - /******************************************************************************* * SQLMM internal functions - TODO: Move into separate header files ******************************************************************************/ diff --git a/liblwgeom/lwin_geojson.c b/liblwgeom/lwin_geojson.c index 8899372..bf3d8ea 100644 --- a/liblwgeom/lwin_geojson.c +++ b/liblwgeom/lwin_geojson.c @@ -59,7 +59,11 @@ findMemberByName(json_object* poObj, const char* pszName ) if( NULL != json_object_get_object(poTmp) ) { - assert( NULL != json_object_get_object(poTmp)->head ); + if( NULL == json_object_get_object(poTmp)->head ) + { + geojson_lwerror("invalid GeoJSON representation", 2); + return NULL; + } for( it.entry = json_object_get_object(poTmp)->head; ( it.entry ? @@ -90,7 +94,12 @@ parse_geojson_coord(json_object *poObj, int *hasz, POINTARRAY *pa) const int nSize = json_object_array_length( poObj ); LWDEBUGF(3, "parse_geojson_coord called for array size %d.", nSize ); - + if ( nSize < 2 ) + { + geojson_lwerror("Too few ordinates in GeoJSON", 4); + return LW_FAILURE; + } + // Read X coordinate poObjCoord = json_object_array_get_idx( poObj, 0 ); pt.x = json_object_get_double( poObjCoord ); @@ -101,7 +110,7 @@ parse_geojson_coord(json_object *poObj, int *hasz, POINTARRAY *pa) pt.y = json_object_get_double( poObjCoord ); LWDEBUGF(3, "parse_geojson_coord pt.y = %f.", pt.y ); - if( nSize == 3 ) /* should this be >= 3 ? */ + if( nSize > 2 ) /* should this be >= 3 ? */ { // Read Z coordinate poObjCoord = json_object_array_get_idx( poObj, 2 ); @@ -109,19 +118,27 @@ parse_geojson_coord(json_object *poObj, int *hasz, POINTARRAY *pa) LWDEBUGF(3, "parse_geojson_coord pt.z = %f.", pt.z ); *hasz = LW_TRUE; } - else + else if ( nSize == 2 ) { *hasz = LW_FALSE; /* Initialize Z coordinate, if required */ if ( FLAGS_GET_Z(pa->flags) ) pt.z = 0.0; } - - /* TODO: should we account for nSize > 3 ? */ + else + { + /* TODO: should we account for nSize > 3 ? */ + /* more than 3 coordinates, we're just dropping dimensions here... */ + } /* Initialize M coordinate, if required */ if ( FLAGS_GET_M(pa->flags) ) pt.m = 0.0; } + else + { + /* If it's not an array, just don't handle it */ + return LW_FAILURE; + } return ptarray_append_point(pa, &pt, LW_TRUE); } @@ -136,10 +153,11 @@ parse_geojson_point(json_object *geojson, int *hasz, int root_srid) LWDEBUGF(3, "parse_geojson_point called with root_srid = %d.", root_srid ); coords = findMemberByName( geojson, "coordinates" ); - if ( ! coords ) { + if ( ! coords ) + { geojson_lwerror("Unable to find 'coordinates' in GeoJSON string", 4); - return NULL; - } + return NULL; + } pa = ptarray_construct_empty(1, 0, 1); parse_geojson_coord(coords, hasz, pa); @@ -162,8 +180,8 @@ parse_geojson_linestring(json_object *geojson, int *hasz, int root_srid) points = findMemberByName( geojson, "coordinates" ); if ( ! points ) { geojson_lwerror("Unable to find 'coordinates' in GeoJSON string", 4); - return NULL; - } + return NULL; + } pa = ptarray_construct_empty(1, 0, 1); @@ -356,10 +374,11 @@ parse_geojson_multipolygon(json_object *geojson, int *hasz, int root_srid) } poObjPolys = findMemberByName( geojson, "coordinates" ); - if ( ! poObjPolys ) { + if ( ! poObjPolys ) + { geojson_lwerror("Unable to find 'coordinates' in GeoJSON string", 4); - return NULL; - } + return NULL; + } if( json_type_array == json_object_get_type( poObjPolys ) ) { @@ -432,10 +451,11 @@ parse_geojson_geometrycollection(json_object *geojson, int *hasz, int root_srid } poObjGeoms = findMemberByName( geojson, "geometries" ); - if ( ! poObjGeoms ) { + if ( ! poObjGeoms ) + { geojson_lwerror("Unable to find 'geometries' in GeoJSON string", 4); - return NULL; - } + return NULL; + } if( json_type_array == json_object_get_type( poObjGeoms ) ) { @@ -458,16 +478,18 @@ parse_geojson(json_object *geojson, int *hasz, int root_srid) json_object* type = NULL; const char* name; - if( NULL == geojson ) { + if( NULL == geojson ) + { geojson_lwerror("invalid GeoJSON representation", 2); - return NULL; - } + return NULL; + } type = findMemberByName( geojson, "type" ); - if( NULL == type ) { + if( NULL == type ) + { geojson_lwerror("unknown GeoJSON type", 3); - return NULL; - } + return NULL; + } name = json_object_get_string( type ); diff --git a/liblwgeom/lwutil.c b/liblwgeom/lwutil.c index 2f858f7..f7f00c9 100644 --- a/liblwgeom/lwutil.c +++ b/liblwgeom/lwutil.c @@ -343,23 +343,3 @@ clamp_srid(int srid) return newsrid; } -#ifndef HAVE_STRCASESTR -char *strcasestr(const char *s, const char *find) -{ - char c, sc; - size_t len; - - if ((c = *find++) != 0) { - c = tolower((unsigned char)c); - len = strlen(find); - do { - do { - if ((sc = *s++) == 0) - return (NULL); - } while ((char)tolower((unsigned char)sc) != c); - } while (strncasecmp(s, find, len) != 0); - s--; - } - return ((char *)s); -} -#endif diff --git a/libtool b/libtool index 9d82d33..1e69385 100755 --- a/libtool +++ b/libtool @@ -1,6 +1,6 @@ #! /bin/sh # Generated automatically by config.status () -# Libtool was configured on host Butterfly.local: +# Libtool was configured on host Crane.local: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. @@ -88,7 +88,7 @@ EGREP="/usr/bin/grep -E" FGREP="/usr/bin/grep -F" # A BSD- or MS-compatible name lister. -NM="/usr/bin/nm" +NM="/opt/local/bin/nm" # Whether we need soft or hard links. LN_S="ln -s" diff --git a/postgis/lwgeom_box.c b/postgis/lwgeom_box.c index bd7469f..e353074 100644 --- a/postgis/lwgeom_box.c +++ b/postgis/lwgeom_box.c @@ -1,5 +1,5 @@ /********************************************************************** - * $Id: lwgeom_box.c 13134 2014-12-01 08:47:21Z strk $ + * $Id: lwgeom_box.c 13391 2015-03-23 16:34:30Z strk $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.net @@ -52,12 +52,6 @@ Datum BOX2D_in(PG_FUNCTION_ARGS) gbox_init(&box); - if (strcasestr(str,"BOX(") != str ) - { - elog(ERROR,"box2d parser - doesnt start with BOX("); - PG_RETURN_NULL(); - } - for(i = 0; str[i]; i++) { str[i] = tolower(str[i]); } diff --git a/postgis/sqldefines.h b/postgis/sqldefines.h index 67e01ec..1902b06 100644 --- a/postgis/sqldefines.h +++ b/postgis/sqldefines.h @@ -9,7 +9,7 @@ #define POSTGIS_PGSQL_VERSION 93 #define POSTGIS_GEOS_VERSION 35 #define POSTGIS_PROJ_VERSION 48 -#define POSTGIS_LIB_VERSION '2.1.6' +#define POSTGIS_LIB_VERSION '2.1.7' #define POSTGIS_LIBXML2_VERSION 2.9.2 /* @@ -18,12 +18,12 @@ * won't substitute within apostrophes) */ #define _POSTGIS_SQL_SELECT_POSTGIS_VERSION 'SELECT ''2.1 USE_GEOS=1 USE_PROJ=1 USE_STATS=1''::text AS version' -#define _POSTGIS_SQL_SELECT_POSTGIS_BUILD_DATE 'SELECT ''2015-03-20 17:18:30''::text AS version' +#define _POSTGIS_SQL_SELECT_POSTGIS_BUILD_DATE 'SELECT ''2015-03-30 12:54:40''::text AS version' #if POSTGIS_SVN_REVISION -#define _POSTGIS_SQL_SELECT_POSTGIS_SCRIPTS_VERSION $$ SELECT '2.1.6'::text || ' r' || POSTGIS_SVN_REVISION::text AS version $$ +#define _POSTGIS_SQL_SELECT_POSTGIS_SCRIPTS_VERSION $$ SELECT '2.1.7'::text || ' r' || POSTGIS_SVN_REVISION::text AS version $$ #else -#define _POSTGIS_SQL_SELECT_POSTGIS_SCRIPTS_VERSION $$ SELECT '2.1.6'::text AS version $$ +#define _POSTGIS_SQL_SELECT_POSTGIS_SCRIPTS_VERSION $$ SELECT '2.1.7'::text AS version $$ #endif #define SRID_USR_MAX 998999 diff --git a/postgis_svn_revision.h b/postgis_svn_revision.h index b312c3c..1564b5a 100644 --- a/postgis_svn_revision.h +++ b/postgis_svn_revision.h @@ -1 +1 @@ -#define POSTGIS_SVN_REVISION 13384 +#define POSTGIS_SVN_REVISION 13414 diff --git a/raster/rt_pg/rt_pg.c b/raster/rt_pg/rt_pg.c index 6873c1a..1d0cfaa 100644 --- a/raster/rt_pg/rt_pg.c +++ b/raster/rt_pg/rt_pg.c @@ -1,5 +1,5 @@ /* - * $Id: rt_pg.c 13199 2015-01-24 17:33:34Z dustymugs $ + * $Id: rt_pg.c 13394 2015-03-24 13:39:49Z dustymugs $ * * WKTRaster - Raster Types for PostGIS * http://trac.osgeo.org/postgis/wiki/WKTRaster @@ -2754,16 +2754,20 @@ static void rtpg_dumpvalues_arg_destroy(rtpg_dumpvalues_arg arg) { if (arg->nbands != NULL) pfree(arg->nbands); - for (i = 0; i < arg->numbands; i++) { - if (arg->values[i] != NULL) - pfree(arg->values[i]); + if (arg->values != NULL) { + for (i = 0; i < arg->numbands; i++) { - if (arg->nodata[i] != NULL) - pfree(arg->nodata[i]); - } + if (arg->values[i] != NULL) + pfree(arg->values[i]); + + if (arg->nodata[i] != NULL) + pfree(arg->nodata[i]); + + } - if (arg->values != NULL) pfree(arg->values); + } + if (arg->nodata != NULL) pfree(arg->nodata); } @@ -3535,7 +3539,7 @@ Datum RASTER_setPixelValuesArray(PG_FUNCTION_ARGS) pfree(nulls); } /* hasnosetvalue and nosetvalue */ - else if (!PG_ARGISNULL(6) & PG_GETARG_BOOL(6)) { + else if (!PG_ARGISNULL(6) && PG_GETARG_BOOL(6)) { hasnosetval = TRUE; if (PG_ARGISNULL(7)) nosetvalisnull = TRUE; diff --git a/raster/test/regress/rt_dumpvalues.sql b/raster/test/regress/rt_dumpvalues.sql index a305bd8..1efad9b 100644 --- a/raster/test/regress/rt_dumpvalues.sql +++ b/raster/test/regress/rt_dumpvalues.sql @@ -100,4 +100,15 @@ DROP TABLE IF EXISTS raster_dumpvalues; -- ticket #2493 -SELECT (ST_DumpValues(ST_AddBand(ST_MakeEmptyRaster(0, 0, 0, 0, 1), ARRAY[ROW(NULL, '8BUI', 255, 0),ROW(NULL, '16BUI', 1, 2)]::addbandarg[]))).* +SELECT (ST_DumpValues(ST_AddBand(ST_MakeEmptyRaster(0, 0, 0, 0, 1), ARRAY[ROW(NULL, '8BUI', 255, 0),ROW(NULL, '16BUI', 1, 2)]::addbandarg[]))).*; + +-- #3086 +DROP TABLE IF EXISTS raster_tile; +CREATE TABLE raster_tile AS + WITH foo AS ( + SELECT ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(3, 3, 0, 0, 1, -1, 0, 0, 0), 1, '8BUI', 1, 0), 2, '8BUI', 10, 0) AS rast UNION ALL + SELECT ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(3, 3, 3, 0, 1, -1, 0, 0, 0), 1, '8BUI', 2, 0), 2, '8BUI', 20, 0) AS rast + ) + SELECT ST_Union(rast) AS rast FROM foo; +WITH foo AS (SELECT ST_Tile(rast, 3, 3, TRUE) AS rast FROM raster_tile) SELECT (ST_DumpValues(rast, array[1,2,3])).* FROM foo; +DROP TABLE IF EXISTS raster_tile; -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/postgis.git _______________________________________________ Pkg-grass-devel mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel

