From edd9019cad171105ae44437ec2c0a9537d017ba9 Mon Sep 17 00:00:00 2001 From: "Matthew L. Fidler" Date: Wed, 29 Nov 2023 09:54:13 -0600 Subject: [PATCH] etTrans security fixes --- src/etTran.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/etTran.cpp b/src/etTran.cpp index b12bf4f4..ef8d5d3c 100644 --- a/src/etTran.cpp +++ b/src/etTran.cpp @@ -313,10 +313,10 @@ IntegerVector toCmt(RObject inCmt, CharacterVector& state, const bool isDvid, warn = warn + std::to_string(warnDvid[i]) + ", "; } warn = warn + std::to_string(warnDvid[warnDvid.size()-1]); - Rf_warningcall(R_NilValue, warn.c_str()); + Rf_warningcall(R_NilValue, "%s", warn.c_str()); } if (warnConvertDvid.size() > 0){ - Rf_warningcall(R_NilValue, warnC.c_str()); + Rf_warningcall(R_NilValue, "%s", warnC.c_str()); } return out; } else { @@ -647,7 +647,7 @@ List etTransParse(List inData, List mv, bool addCmt=false, wKeep += " " + as(keep[j]); } } - Rf_warningcall(R_NilValue, wKeep.c_str()); + Rf_warningcall(R_NilValue, "%s", wKeep.c_str()); } List covUnits(covCol.size()); CharacterVector covUnitsN(covCol.size()); @@ -1857,7 +1857,7 @@ List etTransParse(List inData, List mv, bool addCmt=false, doseId.push_back(allId[j]); } } - Rf_warningcall(R_NilValue, idWarn.c_str()); + Rf_warningcall(R_NilValue, "%s", idWarn.c_str()); redoId=true; } } @@ -1895,7 +1895,7 @@ List etTransParse(List inData, List mv, bool addCmt=false, } } } - if (!_ini0) Rf_warningcall(R_NilValue, idWarn.c_str()); + if (!_ini0) Rf_warningcall(R_NilValue, "%s", idWarn.c_str()); } if (warnCensNA) Rf_warningcall(R_NilValue, _("censoring missing 'DV' values do not make sense")); if (warnNaTime) Rf_warningcall(R_NilValue, _("missing 'TIME' values do not make sense (ignored)"));