diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index 77427680af..b9bd90fa73 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -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);