Skyost / Bonsoir

A Zeroconf library that allows you to discover network services and to broadcast your own. Based on Apple Bonjour and Android NSD.
http://bonsoir.skyost.eu/
Other
100 stars 43 forks source link

Crash when TXT record contains empty properties #81

Closed foxik0169 closed 5 months ago

foxik0169 commented 5 months ago

When resolving device, if txt record of broadcast contains attribute that is set to empty ("propertyName="), the BonsoirDevice fails in constructor with NullReferenceException. This happens because String() constructor can not be called with null.

I would expect empty string to be used there without crash.

Used bonsoir 5.1.5 on Android.

clintpurser commented 5 months ago

also running into this.

Skyost commented 5 months ago

Hey,

Thanks for reporting. In the future, please also provide a stacktrace. It really saves a lot of time for debugging problems like this 🙂