ela-compil / BACnet

BACnet protocol library for .NET :satellite:
https://www.nuget.org/packages/bacnet/
MIT License
217 stars 96 forks source link

Throws exception when parsing 'BacnetAddress' structure with broadcast mac address #113

Closed LADSoft closed 1 year ago

LADSoft commented 2 years ago

I tried to read someone's notification class recipient list and had a problem with that. Basically, they had stuck a by address record in with a broadcast mac address. I looked and the spec specifically allows for this; basically an empty byte array in the MAC address field is considered to be a broadcast address. (FWIW this same record also had the broadcast network address of 0xffff)

The ASN1 decoding for context tags threw an exception on this... 'Source array not long enough' in a block copy, or some such. so even though I got a valid response from the other side it was useless to me.

Wondering if we can get this fixed? I would go ahead and fix it myself but I'm not geared up for the version of C# that the project needs to be compiled with...

LADSoft commented 1 year ago

i fixed this in #117 , closing this issue.