bareos: master ac837b04
Author | Committer | Branch | Timestamp | Parent | |
---|---|---|---|---|---|
joergs | joergs | master | 2021-02-25 17:12 | master fbb77b06 | Pending |
Changeset | bstrncpy: workaround when used with overlapping strings Workaround for a problem, that has occured while parsing a configuration file containing a long time type directive. However, it has only be observed on * Debian 9, 32bit, * CXXFLAGS contains -fstack-protector-strong (default for Bareos packages) In this situation, bstrncpy(str, &str[NUM], len) does not work as expected. Instead, only the initial bytes from str[NUM] are copied, but not the full string. This workaround tries to detect overlapping strings and uses a copy instead. Unittests have been added to test the behaviour. |
||||
mod - core/src/lib/bsys.cc | Diff File | ||||
mod - core/src/lib/edit.cc | Diff File | ||||
mod - core/src/tests/CMakeLists.txt | Diff File | ||||
add - core/src/tests/bsys_test.cc | Diff File | ||||
add - core/src/tests/configs/bareos-configparser-tests/bareos-dir-CFG_TYPE_TIME.conf | Diff File | ||||
mod - core/src/tests/test_config_parser_dir.cc | Diff File |