strnlen will cause a crash when called with a nullptr. Where this macro is called, there are already some checks for optional fields, however it is a bit 'not so nice' for the device to crash when accidentally a nullptr is given for for example the id or will message. (will topic is checked, will message is not)
See: https://github.com/hmueller01/pubsubclient3/pull/48
strnlen will cause a crash when called with a nullptr. Where this macro is called, there are already some checks for optional fields, however it is a bit 'not so nice' for the device to crash when accidentally a nullptr is given for for example the id or will message. (will topic is checked, will message is not)
See: https://github.com/hmueller01/pubsubclient3/pull/48