提交 991b5c7b 编写于 作者: dengyihao's avatar dengyihao

fix: avoid invalid read/write

上级 56f7b46a
......@@ -70,6 +70,9 @@ static int metaSaveJsonVarToIdx(SMeta *pMeta, const SMetaEntry *pCtbEntry, const
char * key = pTagVal->pKey;
int32_t nKey = strlen(key);
if (nKey == 0) {
continue;
}
SIndexTerm *term = NULL;
if (type == TSDB_DATA_TYPE_NULL) {
......@@ -98,7 +101,6 @@ static int metaSaveJsonVarToIdx(SMeta *pMeta, const SMetaEntry *pCtbEntry, const
if (term != NULL) {
indexMultiTermAdd(terms, term);
}
memset(key, 0, sizeof(key));
}
tIndexJsonPut(pMeta->pTagIvtIdx, terms, tuid);
indexMultiTermDestroy(terms);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册