From e71dfd549947652dccb8ac809d51669ff7f75723 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Sun, 19 May 2024 16:54:21 -0400 Subject: [PATCH] add printf style formatting to Rf_error calls to resolve format-security errors at compile time Signed-off-by: Tom Callaway --- src/bindings/r/local.i | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bindings/r/local.i b/src/bindings/r/local.i index 45ed35c8bb..4ceca78c6e 100644 --- a/src/bindings/r/local.i +++ b/src/bindings/r/local.i @@ -230,10 +230,10 @@ namespace std $action } catch (const SBMLConstructorException &e){ - Rf_error(e.what()); + Rf_error("%s", e.what()); } catch (const SBMLExtensionException &e){ - Rf_error(e.what()); + Rf_error("%s", e.what()); } } %enddef @@ -311,7 +311,7 @@ SBMLCONSTRUCTOR_EXCEPTION(ListOfUnits) $action } catch (const XMLConstructorException &e){ - Rf_error(e.what()); + Rf_error("%s", e.what()); } }