|
|
@ -2026,6 +2026,10 @@ static int conf__parse_string(char **token, const char *name, char **value, char
|
|
|
|
while((*token)[0] == ' ' || (*token)[0] == '\t'){
|
|
|
|
while((*token)[0] == ' ' || (*token)[0] == '\t'){
|
|
|
|
(*token)++;
|
|
|
|
(*token)++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if(mosquitto_validate_utf8(*token, strlen(*token))){
|
|
|
|
|
|
|
|
log__printf(NULL, MOSQ_LOG_ERR, "Error: Malformed UTF-8 in configuration.");
|
|
|
|
|
|
|
|
return MOSQ_ERR_INVAL;
|
|
|
|
|
|
|
|
}
|
|
|
|
*value = mosquitto__strdup(*token);
|
|
|
|
*value = mosquitto__strdup(*token);
|
|
|
|
if(!*value){
|
|
|
|
if(!*value){
|
|
|
|
log__printf(NULL, MOSQ_LOG_ERR, "Error: Out of memory.");
|
|
|
|
log__printf(NULL, MOSQ_LOG_ERR, "Error: Out of memory.");
|
|
|
|