From c38b7de6a120e6392abff50afd9bb919cc858cfc Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Sun, 10 Mar 2019 11:47:27 -0600 Subject: [PATCH 1/2] Fix format-security error with octave 5.1 --- Lib/octave/octrun.swg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/octave/octrun.swg b/Lib/octave/octrun.swg index 301233103..ff614e681 100644 --- a/Lib/octave/octrun.swg +++ b/Lib/octave/octrun.swg @@ -51,7 +51,7 @@ SWIGRUNTIME octave_value SWIG_Error(int code, const char *msg) { octave_value type(SWIG_ErrorType(code)); std::string r = msg; r += " (" + type.string_value() + ")"; - error(r.c_str()); + error("%s", r.c_str()); return octave_value(r); } @@ -840,7 +840,7 @@ SWIGRUNTIME void swig_acquire_ownership_obj(void *vptr, int own); const std::string opname = std::string("__") + octave_base_value::get_umap_name(umap) + std::string("__"); octave_value ret; if (!dispatch_unary_op(opname, ret)) { - error((opname + std::string(" method not found")).c_str()); + error("%s", (opname + std::string(" method not found")).c_str()); return octave_value(); } return ret; From 38572f925136e6263d648eafb9fbec9211e03bc7 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Mon, 11 Mar 2019 18:53:48 +0000 Subject: [PATCH 2/2] Add changes entry for Octave 5.1 format-security fix --- CHANGES.current | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.current b/CHANGES.current index 2b77e63f3..80230e964 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -7,6 +7,11 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/ Version 4.0.0 (in progress) =========================== +2019-03-11: dirteat,opoplawski + [Octave] Fix compilation errors in Octave 5.1. + + error: format not a string literal and no format arguments [-Werror=format-security] + 2019-02-28: wsfulton [Java] std::vector improvements for types that do not have a default constructor.