[postgis-tickets] [SCM] PostGIS branch stable-3.0 updated. 3.0.1-17-g43fd77f
git at osgeo.org
git at osgeo.org
Tue Jun 9 08:18:32 PDT 2020
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".
The branch, stable-3.0 has been updated
via 43fd77f43a7a5229e58143b9814a2b82262724fe (commit)
from 10c94128723a8773481d5e6eeca2215a78bb151a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 43fd77f43a7a5229e58143b9814a2b82262724fe
Author: Regina Obe <lr at pcorp.us>
Date: Tue Jun 9 11:18:27 2020 -0400
Fix for raster crash. References #4699 for 3.0.2 - Jaime Casanova (2nd Quadrant)
diff --git a/NEWS b/NEWS
index 4b029d9..f73b9b2 100644
--- a/NEWS
+++ b/NEWS
@@ -5,8 +5,8 @@ PostGIS 3.0.2
- #4652, Fix several memory related bugs in ST_GeomFromGML (Raúl Marín)
- #4661, Fix access to spatial_ref_sys with a non default schema (Raúl Marín)
- #4670, ST_AddPoint: Fix bug when a positive position is requested (Raúl Marín)
- - #4702, Legacy ST_Locate_Between_Measures is wrong (Kaplas80)
-
+ - #4702, Legacy ST_Locate_Between_Measures is wrong (Kaplas80)
+ - #4699, crash on null input to ST_Union(raster, otherarg) (Jaime Casanova, 2ndQuadrant)
PostGIS 3.0.1
2020/02/20
diff --git a/raster/rt_pg/rtpg_mapalgebra.c b/raster/rt_pg/rtpg_mapalgebra.c
index 5993473..0caede2 100644
--- a/raster/rt_pg/rtpg_mapalgebra.c
+++ b/raster/rt_pg/rtpg_mapalgebra.c
@@ -2891,8 +2891,11 @@ Datum RASTER_union_finalfn(PG_FUNCTION_ARGS)
PG_RETURN_NULL();
}
}
- else
+ else {
_raster = iwr->bandarg[i].raster[0];
+ if (_raster == NULL)
+ continue;
+ }
/* first band, _rtn doesn't exist */
if (i < 1) {
diff --git a/raster/test/regress/rt_union.sql b/raster/test/regress/rt_union.sql
index a64b23a..fb93ae0 100644
--- a/raster/test/regress/rt_union.sql
+++ b/raster/test/regress/rt_union.sql
@@ -457,3 +457,5 @@ DROP TABLE IF EXISTS raster_union_out;
-- Some toxic input
SELECT 'none', ST_Union(r) from ( select null::raster r where false ) f;
SELECT 'null', ST_Union(null::raster);
+--#4699 crash
+SELECT 'null-1', ST_Union(null::raster,1);
diff --git a/raster/test/regress/rt_union_expected b/raster/test/regress/rt_union_expected
index 51cc3e3..699b9df 100644
--- a/raster/test/regress/rt_union_expected
+++ b/raster/test/regress/rt_union_expected
@@ -627,3 +627,4 @@ LAST|2|9|4
LAST|3|9|4
none|
null|
+null-1|
-----------------------------------------------------------------------
Summary of changes:
NEWS | 4 ++--
raster/rt_pg/rtpg_mapalgebra.c | 5 ++++-
raster/test/regress/rt_union.sql | 2 ++
raster/test/regress/rt_union_expected | 1 +
4 files changed, 9 insertions(+), 3 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list