[geos-commits] [SCM] GEOS branch 3.8 updated. 925397281833cbea15050c221299a1cf841afa97

git at osgeo.org git at osgeo.org
Mon Apr 20 08:10:50 PDT 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 "GEOS".

The branch, 3.8 has been updated
       via  925397281833cbea15050c221299a1cf841afa97 (commit)
      from  b2dfcbbc147273c05c0ce521419924614831d4a3 (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 925397281833cbea15050c221299a1cf841afa97
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Mon Apr 20 08:10:40 2020 -0700

    news entry for #1021

diff --git a/NEWS b/NEWS
index cbdfdde..eab62a4 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@ Changes in 3.8.2
 - Bug fixes / improvements
   - DistanceOp against geometry with empty components 
     crashes (#1026, Paul Ramsey)
+  - Remove undefined behaviour in CAPI (#1021, Greg Troxel)
 
 
 Changes in 3.8.1
diff --git a/capi/geos_ts_c.cpp b/capi/geos_ts_c.cpp
index 4391b9b..31f2f1e 100644
--- a/capi/geos_ts_c.cpp
+++ b/capi/geos_ts_c.cpp
@@ -233,7 +233,7 @@ typedef struct GEOSContextHandle_HS {
     }
 
     void
-    NOTICE_MESSAGE(string fmt, ...)
+    NOTICE_MESSAGE(const char *fmt, ...)
     {
         if(NULL == noticeMessageOld && NULL == noticeMessageNew) {
             return;
@@ -241,7 +241,7 @@ typedef struct GEOSContextHandle_HS {
 
         va_list args;
         va_start(args, fmt);
-        int result = vsnprintf(msgBuffer, sizeof(msgBuffer) - 1, fmt.c_str(), args);
+        int result = vsnprintf(msgBuffer, sizeof(msgBuffer) - 1, fmt, args);
         va_end(args);
 
         if(result > 0) {
@@ -255,7 +255,7 @@ typedef struct GEOSContextHandle_HS {
     }
 
     void
-    ERROR_MESSAGE(string fmt, ...)
+    ERROR_MESSAGE(const char *fmt, ...)
     {
         if(NULL == errorMessageOld && NULL == errorMessageNew) {
             return;
@@ -263,7 +263,7 @@ typedef struct GEOSContextHandle_HS {
 
         va_list args;
         va_start(args, fmt);
-        int result = vsnprintf(msgBuffer, sizeof(msgBuffer) - 1, fmt.c_str(), args);
+        int result = vsnprintf(msgBuffer, sizeof(msgBuffer) - 1, fmt, args);
         va_end(args);
 
         if(result > 0) {

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

Summary of changes:
 NEWS               | 1 +
 capi/geos_ts_c.cpp | 8 ++++----
 2 files changed, 5 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list