Check client topic inputs for valid UTF-8.

This commit is contained in:
Roger A. Light
2016-06-20 22:56:01 +01:00
parent fa2d3143a4
commit a8a5daf06b
14 changed files with 191 additions and 31 deletions
+5
View File
@@ -106,6 +106,11 @@ int topic_matches_sub(const char *sub, const char *topic, bool *result)
return mosquitto_topic_matches_sub(sub, topic, result);
}
int validate_utf8(const char *str, int len)
{
return mosquitto_validate_utf8(str, len);
}
int subscribe_simple(
struct mosquitto_message **messages,
int msg_count,
+1
View File
@@ -41,6 +41,7 @@ mosqpp_EXPORT int lib_version(int *major, int *minor, int *revision);
mosqpp_EXPORT int lib_init();
mosqpp_EXPORT int lib_cleanup();
mosqpp_EXPORT int topic_matches_sub(const char *sub, const char *topic, bool *result);
mosqpp_EXPORT int validate_utf8(const char *str, int len);
mosqpp_EXPORT int subscribe_simple(
struct mosquitto_message **messages,
int msg_count,