Closed mrkraimer closed 4 years ago
If the caller requests a field that does not exist then a crash occurs. The following is a fix that will be pushes shortly.
git diff src/pvaClientData.cpp diff --git a/src/pvaClientData.cpp b/src/pvaClientData.cpp index b503732..56b3e7a 100644 --- a/src/pvaClientData.cpp +++ b/src/pvaClientData.cpp @@ -433,6 +433,7 @@ void PvaClientData::parse(const std::vector<std::string> &args) continue; } PVFieldPtr pvField(pvStructure->getSubField(field)); + if(!pvField) throw std::runtime_error(messagePrefix + field +" does not exist"); // look for enumerated structure PVEnumerated pvEnumerated; bool result = pvEnumerated.attach(pvField);
This bug has been fixed.
This change was made
If the caller requests a field that does not exist then a crash occurs. The following is a fix that will be pushes shortly.