[td-225] fix invalid write in tbname query
This commit is contained in:
parent
8114e1e758
commit
d5e0bfc42e
|
@ -1062,10 +1062,9 @@ tExprNode* exprTreeFromTableName(const char* tbnameCond) {
|
||||||
if (*e == TS_PATH_DELIMITER[0]) {
|
if (*e == TS_PATH_DELIMITER[0]) {
|
||||||
cond = e + 1;
|
cond = e + 1;
|
||||||
} else if (*e == ',') {
|
} else if (*e == ',') {
|
||||||
size_t len = e - cond + VARSTR_HEADER_SIZE;
|
size_t len = e - cond;
|
||||||
char* p = exception_malloc(len);
|
char* p = exception_malloc(len + VARSTR_HEADER_SIZE);
|
||||||
varDataSetLen(p, len - VARSTR_HEADER_SIZE);
|
STR_WITH_SIZE_TO_VARSTR(p, cond, len);
|
||||||
memcpy(varDataVal(p), cond, len);
|
|
||||||
cond += len;
|
cond += len;
|
||||||
taosArrayPush(pVal->arr, &p);
|
taosArrayPush(pVal->arr, &p);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue