diff --git a/plugins/restful/adapter_handle.c b/plugins/restful/adapter_handle.c index fb52a515..89588615 100644 --- a/plugins/restful/adapter_handle.c +++ b/plugins/restful/adapter_handle.c @@ -37,7 +37,7 @@ void handle_add_adapter(nng_aio *aio) REST_PROCESS_HTTP_REQUEST_VALIDATE_JWT( aio, neu_json_add_node_req_t, neu_json_decode_add_node_req, { - if (strlen(req->name) > NEU_NODE_NAME_LEN) { + if (strlen(req->name) >= NEU_NODE_NAME_LEN) { NEU_JSON_RESPONSE_ERROR(NEU_ERR_NODE_NAME_TOO_LONG, { http_response(aio, NEU_ERR_NODE_NAME_TOO_LONG, result_error); diff --git a/plugins/restful/group_config_handle.c b/plugins/restful/group_config_handle.c index a8a4652a..7ee70ab5 100644 --- a/plugins/restful/group_config_handle.c +++ b/plugins/restful/group_config_handle.c @@ -36,7 +36,7 @@ void handle_add_group_config(nng_aio *aio) REST_PROCESS_HTTP_REQUEST_VALIDATE_JWT( aio, neu_json_add_group_config_req_t, neu_json_decode_add_group_config_req, { - if (strlen(req->group) > NEU_GROUP_NAME_LEN) { + if (strlen(req->group) >= NEU_GROUP_NAME_LEN) { NEU_JSON_RESPONSE_ERROR(NEU_ERR_GROUP_NAME_TOO_LONG, { http_response(aio, NEU_ERR_GROUP_NAME_TOO_LONG, result_error); diff --git a/src/adapter/driver/driver.c b/src/adapter/driver/driver.c index b1c82a71..c97031b7 100644 --- a/src/adapter/driver/driver.c +++ b/src/adapter/driver/driver.c @@ -506,11 +506,11 @@ int neu_adapter_driver_add_tag(neu_adapter_driver_t *driver, const char *group, return NEU_ERR_TAG_NAME_TOO_LONG; } - if (strlen(tag->address) > NEU_TAG_ADDRESS_LEN) { + if (strlen(tag->address) >= NEU_TAG_ADDRESS_LEN) { return NEU_ERR_TAG_ADDRESS_TOO_LONG; } - if (strlen(tag->description) > NEU_TAG_DESCRIPTION_LEN) { + if (strlen(tag->description) >= NEU_TAG_DESCRIPTION_LEN) { return NEU_ERR_TAG_DESCRIPTION_TOO_LONG; } diff --git a/version b/version index eb430cbb..72d132f7 100644 --- a/version +++ b/version @@ -1 +1 @@ -2.2.8 \ No newline at end of file +2.2.9 \ No newline at end of file