OptionDataDef uses raw pointers (should be strings or smartptrs)
The following structures use raw pointers in src/lib/dhcp/option_data_types.h
:
struct OptionDefParams {
const char* name; // option name
uint16_t code; // option code
const char* space; // option space
OptionDataType type; // data type
bool array; // is array
const OptionDataType* records; // record fields
size_t records_size; // number of fields in a record
const char* encapsulates; // option space encapsulated by the
// particular option.
};
/// @brief Encapsulation of option definition parameters and the structure size.
struct OptionDefParamsEncapsulation {
const struct OptionDefParams* optionDefParams; // parameters structure
const int size; // structure size
const char* space; // option space
};
Those structures should be converted to a safer approach - either plain std::string or a smartptr if some data sharing is needed.