From 76f38ee03a06807f42e5fd9280c3cd3ec134fc51 Mon Sep 17 00:00:00 2001 From: shenglian zhou Date: Sun, 17 Jul 2022 05:19:01 +0800 Subject: [PATCH] feat: change bufSize to leave space for var string header --- source/libs/executor/src/scanoperator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);