feat: change bufSize to leave space for var string header

This commit is contained in:
shenglian zhou 2022-07-17 05:19:01 +08:00
parent de1ca5b68f
commit 76f38ee03a
1 changed files with 1 additions and 1 deletions

View File

@ -1978,7 +1978,7 @@ static SSDataBlock* sysTableScanUserTags(SOperatorInfo* pOperator) {
}
}
int32_t bufSize = IS_VAR_DATA_TYPE(tagType) ? tagLen : 1024;
int32_t bufSize = IS_VAR_DATA_TYPE(tagType) ? tagLen + VARSTR_HEADER_SIZE : 1024;
char* tagVarChar = NULL;
if (tagData != NULL) {
tagVarChar = taosMemoryMalloc(bufSize);