-
-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A fresh -Wformat-security issue under r-devel #1287
Comments
Hello, Today I was contacted by CRAN to take care of In the check log (https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-debian-clang/PoissonBinomial-00check.html), there were 27 identical warnings like
All the indicated lines are identical:
When looking at the install log (https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-debian-clang/PoissonBinomial-00install.html), it becomes clear that the security warnings originate from Rcpp header
Seems to be the very issue that you pointed out. Maybe there are other packages that are affected by this, too. Is there something I have to do or do I just have to wait for you to release a fixed package version and the warning to vanish? Best |
Yes, I actually got five such emails myself today for packages of mine using The fix is simple thanks to PR #1288 we made two days ago. Install Rcpp 1.0.11.5 from the
and then re-run |
Thanks for the quick fix and the comment on how to fix issues with packages linking to Rcpp. |
My pleasure! As you see in this ticket, I actually hit is myself updating a package a few days ago. And I am sure we will hear more about it here, at StackOverflow, or on lists such as |
I tried to resubmit my fixed package without changing But still, thank you very much for your quick response. It is very much appreciated. |
That is expected. You actually changed code, so that requires a version that is strictly monotonically higher than the one it replaces. PS I see where I confused you writing "so you do not need to change anything in DESCRIPTION". Will edit. |
Purely my mistake. I should have known not to take that so literally. Anyway... While I am at it: Which Rcpp version should be specified as the minimum requirement in |
That is what my comment is about: No change needed in DESCRIPTION as that determines a run-time dependency but we have no change in run-time here. Remember that these warnings come from a fixed, static, generated file Makes sense? |
See eg RcppCore/Rcpp#1287 for more details
for howto, see RcppCore/Rcpp#1287
…itHub to resolve warnings listed in issue: RcppCore/Rcpp#1287.
Update 2023-11-28: If you came here because of a similar message in your package please read on and see particularly this comment below for the fairly simple fix.
While working on an update for
RQuantLib
with a few r-devel discovered minor changes, CRAN and I both came across a new nag this time from-Wformat-security.
. Our glue code insrc/attributes.cpp
doesand the
Rf_error(someCharvariablehere)
now makes the compiler bark under-Wformat-security
:The fix is pretty easy: add a
"%s"
. I will take care of that shortly.The text was updated successfully, but these errors were encountered: