Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Double buffer size for 'name1' and 'name2'
ASan detected stack-buffer-overflow (READ of 23 bytes) in std::basic_string constructor which is called by `SimHitsValidationHcal::getHistogramTypes()`. A quick test showed that we always overflow `name2`, it's usual size is 21-23 chars. The patch doubles buffers size for `name1` and `name2` to 40 bytes and uses `snprintf` to make sure it never overflows. Signed-off-by: David Abdurachmanov <David.Abdurachmanov@cern.ch>
- Loading branch information
David Abdurachmanov
authored and
David Abdurachmanov
committed
Oct 20, 2015
1 parent
cf89ee4
commit b134384
Showing
1 changed file
with
15 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters