Remove unsigned comparison against <0.

Coverity CID 1292471.
pull/211/merge
Roger A. Light 11 years ago
parent a6827df6c0
commit 15b291eaa4

@ -1424,7 +1424,9 @@ int _config_read_file_core(struct mqtt3_config *config, bool reload, const char
}
}else if(!strcmp(token, "message_size_limit")){
if(_conf_parse_int(&token, "message_size_limit", (int *)&config->message_size_limit, saveptr)) return MOSQ_ERR_INVAL;
if(config->message_size_limit < 0 || config->message_size_limit > MQTT_MAX_PAYLOAD){
if(config->message_size_limit > MQTT_MAX_PAYLOAD){
y
l
_mosquitto_log_printf(NULL, MOSQ_LOG_ERR, "Error: Invalid message_size_limit value (%d).", config->message_size_limit);
return MOSQ_ERR_INVAL;
}

Loading…
Cancel
Save