Fixed array-bounds on BACnetObjectPropertyReference parsing. (#1167)

This commit is contained in:
Steve Karg
2025-12-02 15:04:45 -06:00
committed by GitHub
parent bdfe70639c
commit e7f1101808
2 changed files with 5 additions and 1 deletions
+1
View File
@@ -43,6 +43,7 @@ The git repositories are hosted at the following sites:
### Fixed
* Fixed array-bounds on BACnetObjectPropertyReference parsing. (#1167)
* Fixed the missing BACnetObjectPropertyReference,
BACnetSCFailedConnectionRequest, BACnetSCHubFunctionConnection,
BACnetSCDirectConnection,BACnetSCHubConnection, BACnetTimerStateChangeValue,
+4 -1
View File
@@ -4415,7 +4415,7 @@ static bool device_object_property_reference_from_ascii(
value->objectIdentifier.type = object_type;
value->objectIdentifier.instance = object_instance;
value->propertyIdentifier = property_id;
if (array_index < 0) {
if (array_index < 0L) {
value->arrayIndex = BACNET_ARRAY_ALL;
} else {
value->arrayIndex = array_index;
@@ -4490,6 +4490,9 @@ static bool object_property_reference_from_ascii(
value->object_identifier.type = object_type;
value->object_identifier.instance = object_instance;
value->property_identifier = property_id;
if ((array_index >= BACNET_ARRAY_ALL) || (array_index < 0L)) {
array_index = BACNET_ARRAY_ALL;
}
value->property_array_index = array_index;
status = true;
}