From eaa6ca2701d4c02d1f1df9357e6e33d471c0ab13 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Mon, 14 Sep 2020 17:44:29 +0800 Subject: [PATCH] [td-1391] upate the check of vgroup info. --- src/client/src/tscServer.c | 5 +++-- src/util/src/tsocket.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index 1b6a77bdc7..32a4df4963 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -1677,8 +1677,9 @@ int tscProcessTableMetaRsp(SSqlObj *pSql) { pMetaMsg->contLen = htons(pMetaMsg->contLen); pMetaMsg->numOfColumns = htons(pMetaMsg->numOfColumns); - if (pMetaMsg->sid < 0 || pMetaMsg->vgroup.numOfEps < 0) { - tscError("invalid meter vgId:%d, sid%d", pMetaMsg->vgroup.numOfEps, pMetaMsg->sid); + if (pMetaMsg->sid <= 0 || pMetaMsg->vgroup.vgId < 2 || pMetaMsg->vgroup.numOfEps <= 0) { + tscError("invalid value in table numOfEps:%d, vgId:%d sid%d", pMetaMsg->vgroup.numOfEps, + pMetaMsg->vgroup.vgId, pMetaMsg->sid); return TSDB_CODE_TSC_INVALID_VALUE; } diff --git a/src/util/src/tsocket.c b/src/util/src/tsocket.c index 498fc6af6b..479eeaa754 100644 --- a/src/util/src/tsocket.c +++ b/src/util/src/tsocket.c @@ -60,7 +60,7 @@ uint32_t taosGetIpFromFqdn(const char *fqdn) { uError("failed to get the ip address, fqdn:%s, code:%d, reason:%s", fqdn, ret, strerror(errno)); terrno = TAOS_SYSTEM_ERROR(errno); } else { - uError("failed get the ip address, fqdn:%s, code:%d, reason:%s", fqdn, ret, gai_strerror(ret)); + uError("failed to get the ip address, fqdn:%s, code:%d, reason:%s", fqdn, ret, gai_strerror(ret)); } return 0xFFFFFFFF; -- GitLab