提交 89da3e14 编写于 作者: F freemine

bugfix: alloc space for holding null-terminator

上级 5e2d1aae
......@@ -5298,7 +5298,7 @@ static int32_t convertQueryMsg(SQueryTableMsg *pQueryMsg, SArray **pTableIdList,
if (pColFilter->filterstr) {
pColFilter->len = htobe64(pFilterMsg->len);
pColFilter->pz = (int64_t) calloc(1, pColFilter->len);
pColFilter->pz = (int64_t) calloc(1, pColFilter->len + 1 * TSDB_NCHAR_SIZE); // note: null-terminator
memcpy((void *)pColFilter->pz, pMsg, pColFilter->len);
pMsg += (pColFilter->len + 1);
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册