Fix mg_url_decode fuzz

This commit is contained in:
cpq committed 2020-12-11 09:35:50 +00:00
1 parent 369f44adfa
commit 1b551741b8
5 files changed
+26 -10

No files matched your search

+1 -1
View File
@@ -150,7 +150,7 @@ static int parse(const uint8_t *in, size_t inlen, struct mqtt_message *m) {
len += (lc & 0x7f) << 7 * len_len;
len_len++;
if (!(lc & 0x80)) break;
if (len_len > 4) return MQTT_MALFORMED;
if (len_len >= 4) return MQTT_MALFORMED;
}
end = p + len;