Skip to content

Commit ecdd22e

Browse files
authored
Set a format string in Rf_error call (#1288)
* Set a format string in Rf_error call * Roll micro version, update NEWS and ChangeLog
1 parent 205a115 commit ecdd22e

File tree

5 files changed

+15
-5
lines changed

5 files changed

+15
-5
lines changed

ChangeLog

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
2023-11-26 Dirk Eddelbuettel <[email protected]>
2+
3+
* DESCRIPTION (Version, Date): Roll micro version
4+
* inst/include/Rcpp/config.h (RCPP_DEV_VERSION): Idem
5+
6+
* src/attributes.cpp (generateCpp): Add a format string for Rf_error
7+
call to not run afoul of -Wformat-security
8+
19
2023-11-24 Dirk Eddelbuettel <[email protected]>
210

311
* DESCRIPTION (Version, Date): Roll micro version

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: Rcpp
22
Title: Seamless R and C++ Integration
3-
Version: 1.0.11.4
4-
Date: 2023-11-24
3+
Version: 1.0.11.5
4+
Date: 2023-11-26
55
Author: Dirk Eddelbuettel, Romain Francois, JJ Allaire, Kevin Ushey, Qiang Kou,
66
Nathan Russell, Inaki Ucar, Douglas Bates and John Chambers
77
Maintainer: Dirk Eddelbuettel <[email protected]>

inst/NEWS.Rd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
have neem added (Aaron Lun \ghpr{1281}).
1515
\item Three print format correction uncovered by R-devel were
1616
applied with thanks to Tomas Kalibera (Dirk in \ghpr{1285}).
17+
\item Correct a print format correction in the RcppExports glue code
18+
(Dirk in \ghpr{1288} fixing \ghit{1287}).
1719
}
1820
\item Changes in Rcpp Attributes:
1921
\itemize{

inst/include/Rcpp/config.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#define RCPP_VERSION_STRING "1.0.11"
3131

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

3636
#endif

src/attributes.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2961,7 +2961,7 @@ namespace attributes {
29612961
<< " if (rcpp_isError_gen) {" << std::endl
29622962
<< " SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);" << std::endl
29632963
<< " UNPROTECT(1);" << std::endl
2964-
<< " Rf_error(CHAR(rcpp_msgSEXP_gen));" << std::endl
2964+
<< " Rf_error(\"%s\", CHAR(rcpp_msgSEXP_gen));" << std::endl
29652965
<< " }" << std::endl
29662966
<< " UNPROTECT(1);" << std::endl
29672967
<< " return rcpp_result_gen;" << std::endl

0 commit comments

Comments
 (0)