From 5994bed21b94a876b3cbfb15334f2e3a1e83a52f Mon Sep 17 00:00:00 2001 From: Bomin Zhang Date: Mon, 17 Aug 2020 11:18:48 +0800 Subject: [PATCH] fix td-851 --- src/client/src/tscParseInsert.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/client/src/tscParseInsert.c b/src/client/src/tscParseInsert.c index e97d6c32e0..cb49bd80b7 100644 --- a/src/client/src/tscParseInsert.c +++ b/src/client/src/tscParseInsert.c @@ -904,6 +904,11 @@ static int32_t tscCheckIfCreateTable(char **sqlstr, SSqlObj *pSql) { sToken = tStrGetToken(sql, &index, true, numOfIgnoreToken, &ignoreTokenTypes); sql += index; + if (TK_ILLEGAL == sToken.type) { + tdDestroyKVRowBuilder(&kvRowBuilder); + return TSDB_CODE_TSC_INVALID_SQL; + } + if (sToken.n == 0 || sToken.type == TK_RP) { break; } -- GitLab