Zero out MQTTProperty before reading

This commit is contained in:
fpagliughi 2024-07-03 17:52:03 -04:00
parent 3d7a1a61ef
commit 1194bf87b9
1 changed files with 1 additions and 0 deletions

View File

@ -240,6 +240,7 @@ int MQTTProperty_read(MQTTProperty* prop, char** pptr, char* enddata)
int type = -1,
len = -1;
memset(prop, 0, sizeof(MQTTProperty));
prop->identifier = readChar(pptr);
type = MQTTProperty_getType(prop->identifier);
if (type >= MQTTPROPERTY_TYPE_BYTE && type <= MQTTPROPERTY_TYPE_UTF_8_STRING_PAIR)