[postgis-tickets] [SCM] PostGIS branch stable-2.5 updated. e0122c555d635dbfa2f1dd8dc50a08a254260e75

git at osgeo.org git at osgeo.org
Fri Feb 28 04:18:30 PST 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-2.5 has been updated
       via  e0122c555d635dbfa2f1dd8dc50a08a254260e75 (commit)
      from  ad39021643bf450fab0904c954aaefb1f37ecb84 (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 e0122c555d635dbfa2f1dd8dc50a08a254260e75
Author: Raúl Marín <git at rmr.ninja>
Date:   Fri Feb 28 11:57:54 2020 +0100

    Fix gserialized_cmp incorrect comparison
    
    Patch by dkvash and some tweaks by me

diff --git a/NEWS b/NEWS
index c2e4a2a..4e51bfc 100644
--- a/NEWS
+++ b/NEWS
@@ -27,6 +27,7 @@ PostGIS 2.5.4
   - #4605, Fix postgis_upgrade.pl with PostgreSQL 12 (Matti Linnanvuori)
   - #4621, Prevent stack overflow when parsing WKB (Raúl Marín)
   - #4626, Support pkg-config for libxml2 (Bas Couwenberg)
+  - #4646, Fix gserialized_cmp incorrect comparison (dkvash)
 
 
 PostGIS 2.5.3
diff --git a/liblwgeom/g_serialized.c b/liblwgeom/g_serialized.c
index ad7e5e6..2b5312f 100644
--- a/liblwgeom/g_serialized.c
+++ b/liblwgeom/g_serialized.c
@@ -308,8 +308,8 @@ int gserialized_cmp(const GSERIALIZED *g1, const GSERIALIZED *g2)
 		sz2 > 16 &&
 		!FLAGS_GET_BBOX(g1->flags) &&
 		!FLAGS_GET_BBOX(g2->flags) &&
-		*(uint32_t*)(g1+8) == POINTTYPE &&
-		*(uint32_t*)(g2+8) == POINTTYPE
+		gserialized_get_type(g1) == POINTTYPE &&
+		gserialized_get_type(g2) == POINTTYPE
 	)
 	{
 		double *dptr = (double*)(g1->data + sizeof(double));

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

Summary of changes:
 NEWS                     | 1 +
 liblwgeom/g_serialized.c | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list