fix for variable datatype length bounds check (fixes #805)
This commit is contained in:
@@ -465,7 +465,7 @@ result_t Message::create(const string& filename, const DataFieldTemplates* templ
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (id.size() + data->getLength(pt_masterData, maxLength) > 2 + maxLength
|
if (id.size() + data->getLength(pt_masterData, maxLength==MAX_POS ? MAX_POS-id.size() : maxLength) > 2 + maxLength
|
||||||
|| data->getLength(pt_slaveData, maxLength) > maxLength) {
|
|| data->getLength(pt_slaveData, maxLength) > maxLength) {
|
||||||
// max NN exceeded
|
// max NN exceeded
|
||||||
delete data;
|
delete data;
|
||||||
|
|||||||
Reference in New Issue
Block a user