[geos-commits] [SCM] GEOS branch main updated. 3ffdc29d3973d77d2b3505557ed793b3c4ca8111

git at osgeo.org git at osgeo.org
Wed Jun 17 11:16:35 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, main has been updated
       via  3ffdc29d3973d77d2b3505557ed793b3c4ca8111 (commit)
      from  fa569a231414a1f73cb6c4f3c31c259700337035 (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 3ffdc29d3973d77d2b3505557ed793b3c4ca8111
Author: Daniel Baston <dbaston at gmail.com>
Date:   Wed Jun 17 14:16:15 2026 -0400

    CommonBits: clean UBSAN error (#1448)

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