[geos-commits] [SCM] GEOS branch 3.14 updated. 7db6f62d50221a7ccac91c329a9a4fe61d172a56

git at osgeo.org git at osgeo.org
Sat Jun 20 05:10:41 PDT 2026


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 "GEOS".

The branch, 3.14 has been updated
       via  7db6f62d50221a7ccac91c329a9a4fe61d172a56 (commit)
      from  70f292941d2e2243f2db66cf1292bfcffcc001fb (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 7db6f62d50221a7ccac91c329a9a4fe61d172a56
Author: Daniel Baston <dbaston at gmail.com>
Date:   Sat Jun 20 08:10:23 2026 -0400

    CommonBits: clean UBSAN error (#1451)

diff --git a/src/precision/CommonBits.cpp b/src/precision/CommonBits.cpp
index e5d004ebb..179e0d557 100644
--- a/src/precision/CommonBits.cpp
+++ b/src/precision/CommonBits.cpp
@@ -14,6 +14,7 @@
  **********************************************************************/
 
 #include <geos/precision/CommonBits.h>
+#include <limits>
 
 namespace geos {
 namespace precision { // geos.precision
@@ -71,6 +72,11 @@ CommonBits::CommonBits()
 void
 CommonBits::add(double num)
 {
+    if (num > static_cast<double>(std::numeric_limits<std::int64_t>::max())) {
+        commonBits = 0;
+        return;
+    }
+
     int64_t numBits = (int64_t) num;
     if(isFirst) {
         commonBits = numBits;

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

Summary of changes:
 src/precision/CommonBits.cpp | 6 ++++++
 1 file changed, 6 insertions(+)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list