Skip to content

Commit

Permalink
Set a format string in Rf_error call (#1288)
Browse files Browse the repository at this point in the history
* Set a format string in Rf_error call

* Roll micro version, update NEWS and ChangeLog
  • Loading branch information
eddelbuettel authored Nov 26, 2023
1 parent 205a115 commit ecdd22e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2023-11-26 Dirk Eddelbuettel <edd@debian.org>

* DESCRIPTION (Version, Date): Roll micro version
* inst/include/Rcpp/config.h (RCPP_DEV_VERSION): Idem

* src/attributes.cpp (generateCpp): Add a format string for Rf_error
call to not run afoul of -Wformat-security

2023-11-24 Dirk Eddelbuettel <edd@debian.org>

* DESCRIPTION (Version, Date): Roll micro version
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: Rcpp
Title: Seamless R and C++ Integration
Version: 1.0.11.4
Date: 2023-11-24
Version: 1.0.11.5
Date: 2023-11-26
Author: Dirk Eddelbuettel, Romain Francois, JJ Allaire, Kevin Ushey, Qiang Kou,
Nathan Russell, Inaki Ucar, Douglas Bates and John Chambers
Maintainer: Dirk Eddelbuettel <edd@debian.org>
Expand Down
2 changes: 2 additions & 0 deletions inst/NEWS.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
have neem added (Aaron Lun \ghpr{1281}).
\item Three print format correction uncovered by R-devel were
applied with thanks to Tomas Kalibera (Dirk in \ghpr{1285}).
\item Correct a print format correction in the RcppExports glue code
(Dirk in \ghpr{1288} fixing \ghit{1287}).
}
\item Changes in Rcpp Attributes:
\itemize{
Expand Down
4 changes: 2 additions & 2 deletions inst/include/Rcpp/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#define RCPP_VERSION_STRING "1.0.11"

// the current source snapshot (using four components, if a fifth is used in DESCRIPTION we ignore it)
#define RCPP_DEV_VERSION RcppDevVersion(1,0,11,4)
#define RCPP_DEV_VERSION_STRING "1.0.11.4"
#define RCPP_DEV_VERSION RcppDevVersion(1,0,11,5)
#define RCPP_DEV_VERSION_STRING "1.0.11.5"

#endif
2 changes: 1 addition & 1 deletion src/attributes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2961,7 +2961,7 @@ namespace attributes {
<< " if (rcpp_isError_gen) {" << std::endl
<< " SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);" << std::endl
<< " UNPROTECT(1);" << std::endl
<< " Rf_error(CHAR(rcpp_msgSEXP_gen));" << std::endl
<< " Rf_error(\"%s\", CHAR(rcpp_msgSEXP_gen));" << std::endl
<< " }" << std::endl
<< " UNPROTECT(1);" << std::endl
<< " return rcpp_result_gen;" << std::endl
Expand Down

0 comments on commit ecdd22e

Please sign in to comment.