mirror of
https://github.com/knolleary/pubsubclient.git
synced 2026-10-26 22:11:30 +00:00
PubSubClient.h: Using strnlen()
This commit is contained in:
1 parent
d2ff771f4a
commit
719b90eafd
1 file changed
+1
-1
+1
-1
@@ -83,7 +83,7 @@
|
||||
#define MQTT_CALLBACK_SIGNATURE void (*callback)(char*, uint8_t*, unsigned int)
|
||||
#endif
|
||||
|
||||
#define CHECK_STRING_LENGTH(l,s) if (l+2+strlen(s) > MQTT_MAX_PACKET_SIZE) {_client->stop();return false;}
|
||||
#define CHECK_STRING_LENGTH(l,s) if (l+2+strnlen(s, MQTT_MAX_PACKET_SIZE) > MQTT_MAX_PACKET_SIZE) {_client->stop();return false;}
|
||||
|
||||
class PubSubClient : public Print {
|
||||
private:
|
||||
|
||||
Reference in new issue
Block a user