[postgis-tickets] [SCM] PostGIS branch stable-3.1 updated. 3.1.1-40-g04f4524

git at osgeo.org git at osgeo.org
Thu Jul 1 18:31:23 PDT 2021


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.1 has been updated
       via  04f45247bccf9a3955e2c7e6379e7f828c740bfe (commit)
      from  70df06bdfba0d8da3a183a12a6287fd7d1476da5 (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 04f45247bccf9a3955e2c7e6379e7f828c740bfe
Author: Regina Obe <lr at pcorp.us>
Date:   Thu Jul 1 21:31:14 2021 -0400

    Fix summaryagg window crash - references #4724 for PostGIS 3.1.3

diff --git a/raster/rt_pg/rtpg_statistics.c b/raster/rt_pg/rtpg_statistics.c
index 649d7f7..b7bc670 100644
--- a/raster/rt_pg/rtpg_statistics.c
+++ b/raster/rt_pg/rtpg_statistics.c
@@ -850,6 +850,16 @@ Datum RASTER_summaryStats_finalfn(PG_FUNCTION_ARGS)
 		PG_RETURN_NULL();
 	}
 
+	if (NULL == state->stats) {
+		elog(ERROR, "RASTER_summaryStats_finalfn: Cannot compute coverage summary stats");
+		PG_RETURN_NULL();
+	}
+
+	if (NULL == state->stats->count) {
+		elog(ERROR, "RASTER_summaryStats_finalfn: Cannot compute coverage summary stats");
+		PG_RETURN_NULL();
+	}
+
 	/* coverage mean and deviation */
 	if (state->stats->count > 0) {
 		state->stats->mean = state->stats->sum / state->stats->count;

-----------------------------------------------------------------------

Summary of changes:
 raster/rt_pg/rtpg_statistics.c | 10 ++++++++++
 1 file changed, 10 insertions(+)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list