Fix MQTT broker SUBSCRIBE request parsing

Add checks on the number of subscribe requests per packet and overall per-session subscription limit.

PUBLISHED_FROM=faaf5c50af31a0694c9308a664f2e418dbb0eb18
This commit is contained in:
Deomid Ryabkov authored and Cesanta Bot committed 2017-09-06 13:23:13 +00:00
1 parent 77e44c7c0e
commit 97d733e129
2 files changed
+21 -7

No files matched your search

+3 -1
View File
@@ -5380,7 +5380,9 @@ int mg_mqtt_vmatch_topic_expression(const char *exp, struct mg_str topic);
extern "C" {
#endif /* __cplusplus */
#define MG_MQTT_MAX_SESSION_SUBSCRIPTIONS 512;
#ifndef MG_MQTT_MAX_SESSION_SUBSCRIPTIONS
#define MG_MQTT_MAX_SESSION_SUBSCRIPTIONS 512
#endif
struct mg_mqtt_broker;