From fc056695317a20e1a1fd1e4a80bf3354eefbd032 Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Mon, 7 Mar 2022 17:43:30 +0800 Subject: [PATCH] [TS-1286]: validate empry ep in show vnodes command --- src/client/src/tscSQLParser.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index 981c1885e3..c1268079ab 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -3623,6 +3623,10 @@ int32_t setShowInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) { if (pShowInfo->prefix.type == TK_STRING) { pShowInfo->prefix.n = stringProcess(pShowInfo->prefix.z, pShowInfo->prefix.n); } + + if (pShowInfo->prefix.n <= 0) { + return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg6); + } } return TSDB_CODE_SUCCESS; } -- GitLab