diff --git a/src/client/src/tscSystem.c b/src/client/src/tscSystem.c index 63741e08f47316536743f8a8229c8a7cb6de1af0..9fea38c64e581808d2aa09a27aa2082055511016 100644 --- a/src/client/src/tscSystem.c +++ b/src/client/src/tscSystem.c @@ -478,7 +478,7 @@ static setConfRet taos_set_config_imp(const char *config){ if(!taosReadConfigOption(item->string, item->valuestring, NULL, NULL, TAOS_CFG_CSTATUS_OPTION, TSDB_CFG_CTYPE_B_CLIENT)){ ret.retCode = SET_CONF_RET_ERR_PART; if (strlen(ret.retMsg) == 0){ - snprintf(ret.retMsg, RET_MSG_LENGTH - 1, "part error|%s", item->string); + snprintf(ret.retMsg, RET_MSG_LENGTH, "part error|%s", item->string); }else{ int leftSize = RET_MSG_LENGTH - 1 - strlen(ret.retMsg); leftSize = leftSize >= 0 ? leftSize : 0;