Bugfix/bacnet array encoding overflows (#414)

* Add common BACnetARRAY encode function to fix Device object list buffer overflow. Refactor device, analog-output, access-door and binary-output objects to use common BACnetARRAY encoder.

* Fix non-POSIX builds (win32).

* Cleanup some ports/stm32 build warnings
---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
Steve Karg
2023-04-13 20:43:54 -05:00
committed by GitHub
parent 064c6f7f1c
commit e517df0d47
23 changed files with 872 additions and 834 deletions
+6
View File
@@ -298,6 +298,7 @@ extern "C" {
BACNET_STACK_EXPORT
bool Device_Valid_Object_Instance_Number(
uint32_t object_id);
BACNET_STACK_EXPORT
unsigned Device_Object_List_Count(
void);
@@ -306,6 +307,11 @@ extern "C" {
uint32_t array_index,
BACNET_OBJECT_TYPE *object_type,
uint32_t * instance);
BACNET_STACK_EXPORT
int Device_Object_List_Element_Encode(
uint32_t object_instance,
BACNET_ARRAY_INDEX array_index,
uint8_t *apdu);
BACNET_STACK_EXPORT
unsigned Device_Count(