Fixing issue #72: Setting minimum message length to 2.

Signed-off-by: seko24 <seb12@mailbox.org>
This commit is contained in:
seko24
2017-08-09 09:35:38 +02:00
parent 7099531e0e
commit e12682056c
2 changed files with 2 additions and 2 deletions

View File

@@ -248,7 +248,7 @@ int MQTTSNstrlen(MQTTSNString MQTTSNString)
int MQTTSNPacket_read(unsigned char* buf, int buflen, int (*getfn)(unsigned char*, int))
{
int rc = MQTTSNPACKET_READ_ERROR;
const int MQTTSN_MIN_PACKET_LENGTH = 3;
const int MQTTSN_MIN_PACKET_LENGTH = 2;
int len = 0; /* the length of the whole packet including length field */
int lenlen = 0;
int datalen = 0;