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
Fix places were sprintf overflows buffer #19238
Conversation
We should avoid using sprintf, instead a safer option -- snprintf -- should be prefered. It would be better to use std::string and friends where possible. These locations were reported by GCC 7.1.1 as overflowing. E.g., we have a static array of 80 chars, but we write out 105 bytes with sprintf. It's even just a plain string, not formatting involved. DQMStore::book1D also supports std::string. Signed-off-by: David Abdurachmanov <David.Abdurachmanov@cern.ch>
A new Pull Request was created by @davidlt for master. It involves the following packages: DQM/BeamMonitor @vazzolini, @kmaeshima, @dmitrijus, @cmsbuild, @vanbesien, @davidlange6 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
+1 |
The tests are being triggered in jenkins. |
This pull request is fully signed and it will be integrated in one of the next master IBs after it passes the integration tests. This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @smuzaffar |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
+1 |
We should avoid using sprintf, instead a safer option -- snprintf --
should be prefered. It would be better to use std::string and friends
where possible.
These locations were reported by GCC 7.1.1 as overflowing. E.g., we have
a static array of 80 chars, but we write out 105 bytes with sprintf.
It's even just a plain string, not formatting involved.
DQMStore::book1D also supports std::string.
Signed-off-by: David Abdurachmanov David.Abdurachmanov@cern.ch