From dc47e229d8738cc9c46d7edb685d60e61ff53255 Mon Sep 17 00:00:00 2001 From: dapan1121 <89396746@qq.com> Date: Wed, 9 Jun 2021 16:00:37 +0800 Subject: [PATCH] add pointer protection --- src/util/src/ttokenizer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/util/src/ttokenizer.c b/src/util/src/ttokenizer.c index 3448e8e2ba..b02ba96f07 100644 --- a/src/util/src/ttokenizer.c +++ b/src/util/src/ttokenizer.c @@ -275,6 +275,10 @@ static int32_t tKeywordCode(const char* z, int n) { } } + if (keywordHashTable == NULL) { + return TK_ILLEGAL; + } + SKeyword** pKey = (SKeyword**)taosHashGet(keywordHashTable, key, n); return (pKey != NULL)? (*pKey)->type:TK_ID; } -- GitLab