You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So when trying to add response payload (ADPU) bigger than 1476 bytes, the validation with the max_offset goes through even though the size of the buffer is not big enough and we get an IndexOutOfRangeException.
Potential fix
As a first workaround, we tried to increase the max payload in the transport (here). But this has the side effect of causing IP fragmentation because now the packets are too big.
We also tried another fix in BacnetClient.EncodeSegmentHeader. This seems to fix the issue from our initial tests:
Couple of questions for you guys:
Does the fix makes sense?
Are there any tests we can run to validate we don't add regression to the library?
The text was updated successfully, but these errors were encountered:
Issue
When calling ReadPropertyResponse, we get an IndexOutOfRangeException with the following stack trace:
How to reproduce
Investigation
From what we can see, because the request was coming from a BACnet router, the response need to add a bigger NPDU header and this would increase the max_offset of the buffer to a value higher than the actual size of the buffer as you can see here:
So when trying to add response payload (ADPU) bigger than 1476 bytes, the validation with the max_offset goes through even though the size of the buffer is not big enough and we get an IndexOutOfRangeException.
Potential fix
As a first workaround, we tried to increase the max payload in the transport (here). But this has the side effect of causing IP fragmentation because now the packets are too big.
We also tried another fix in BacnetClient.EncodeSegmentHeader. This seems to fix the issue from our initial tests:
Couple of questions for you guys:
The text was updated successfully, but these errors were encountered: