mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
- Fix an out-of-bounds/segmentation fault in `config_getlist` when parsing command-line options that do not specify bracket offsets (e.g. `--rfsimulator.serveraddr`). Added index bracket verification and guarded `memcpy` against `NULL` pointers on list reallocation. - Initialize `valid_idx` to `ParamList->numelt` in `config_getlist` to properly support overriding and appending elements when a configuration file has existing array items. - Fix memory leaks in `end_configmodule` - Add test cases in `test_config_cmdline.cpp` Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org> and assisted-by Gemini
12 lines
511 B
CMake
12 lines
511 B
CMake
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
|
|
|
|
add_executable(test_config_cmdline test_config_cmdline.cpp)
|
|
target_link_libraries(test_config_cmdline PRIVATE CONFIG_LIB GTest::gtest)
|
|
add_dependencies(test_config_cmdline params_libconfig)
|
|
add_dependencies(tests test_config_cmdline)
|
|
|
|
configure_file(test_config.conf test_config.conf COPYONLY)
|
|
|
|
add_test(NAME test_config_cmdline COMMAND ./test_config_cmdline)
|
|
set_tests_properties(test_config_cmdline PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}")
|