[SCM] PostGIS branch master updated. 3.4.0rc1-970-gec6aa0a66
git at osgeo.org
git at osgeo.org
Tue Mar 5 07:13:26 PST 2024
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, master has been updated
via ec6aa0a665fc55dfa981db129de53a88e5d82a2f (commit)
from 64f74d1de5fb2425d5c6fb7cc78f01a5af8926b1 (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 ec6aa0a665fc55dfa981db129de53a88e5d82a2f
Author: Sandro Santilli <strk at kbt.io>
Date: Tue Mar 5 16:13:06 2024 +0100
Do not segfault if lwgeom_node returns null
diff --git a/liblwgeom/cunit/cu_node.c b/liblwgeom/cunit/cu_node.c
index b97f1f325..3497476c2 100644
--- a/liblwgeom/cunit/cu_node.c
+++ b/liblwgeom/cunit/cu_node.c
@@ -30,12 +30,14 @@ static void test_lwgeom_node(void)
in = lwgeom_from_wkt(wkt, LW_PARSER_CHECK_NONE);
out = lwgeom_node(in);
/* printf("%s\n", lwgeom_to_ewkt(out)); */
+ CU_ASSERT_FATAL(out != NULL);
CU_ASSERT(lwgeom_same(in, out));
lwgeom_free(out); lwgeom_free(in);
wkt = "MULTILINESTRING((0 0,0 5),(10 0, -10 5))";
in = lwgeom_from_wkt(wkt, LW_PARSER_CHECK_NONE);
out = lwgeom_node(in);
+ CU_ASSERT_FATAL(out != NULL);
tmp = lwgeom_to_ewkt(out);
CU_ASSERT_STRING_EQUAL("MULTILINESTRING((0 2.5,-10 5),(0 0,0 2.5),(0 2.5,0 5),(10 0,0 2.5))", tmp)
lwfree(tmp); lwgeom_free(out); lwgeom_free(in);
@@ -43,6 +45,7 @@ static void test_lwgeom_node(void)
wkt = "MULTILINESTRING((0 0,5 5,10 0, 11 0, 20 0),(10 0, 12 0, 22 0))";
in = lwgeom_from_wkt(wkt, LW_PARSER_CHECK_NONE);
out = lwgeom_node(in);
+ CU_ASSERT_FATAL(out != NULL);
tmp = lwgeom_to_ewkt(out);
/* printf("%s\n", tmp); */
CU_ASSERT_STRING_EQUAL("MULTILINESTRING((0 0,5 5,10 0),(10 0,11 0,12 0,20 0),(20 0,22 0))", tmp);
@@ -51,6 +54,7 @@ static void test_lwgeom_node(void)
wkt = "MULTILINESTRING((0 0,5 5,10 0, 11 0, 20 0),(22 0, 12 0, 10 0),(0 5, 5 0))";
in = lwgeom_from_wkt(wkt, LW_PARSER_CHECK_NONE);
out = lwgeom_node(in);
+ CU_ASSERT_FATAL(out != NULL);
tmp = lwgeom_to_ewkt(out);
/* printf("%s\n", tmp); */
CU_ASSERT_STRING_EQUAL(
-----------------------------------------------------------------------
Summary of changes:
liblwgeom/cunit/cu_node.c | 4 ++++
1 file changed, 4 insertions(+)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list