Use mg_snprintf()

This commit is contained in:
Sergey Lyubka committed 2022-02-10 11:56:55 +00:00
1 parent 9e634310b4
commit f64c86d23f
22 files changed
+659 -458

No files matched your search

+1 -1
View File
@@ -134,7 +134,7 @@ int mg_mqtt_parse(const uint8_t *buf, size_t len, struct mg_mqtt_message *m) {
if (len_len >= 4) return MQTT_MALFORMED;
}
end = p + n;
if (lc & 0x80 || end > buf + len) return MQTT_INCOMPLETE;
if ((lc & 0x80) || (end > buf + len)) return MQTT_INCOMPLETE;
m->dgram.len = (size_t) (end - buf);
switch (m->cmd) {