From 7b1fce481ae0324cfe121c902f8059f33dc89133 Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Wed, 4 Aug 2021 01:12:10 +0800 Subject: [PATCH] [TD-5694]: fix --- src/common/src/tdataformat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/src/tdataformat.c b/src/common/src/tdataformat.c index 9bcada27cb..c4f3dda7b4 100644 --- a/src/common/src/tdataformat.c +++ b/src/common/src/tdataformat.c @@ -25,7 +25,7 @@ static void tdMergeTwoDataCols(SDataCols *target, SDataCols *src1, int *iter1, i int tdAllocMemForCol(SDataCol *pCol, int maxPoints) { int spaceNeeded = pCol->bytes * maxPoints; if(IS_VAR_DATA_TYPE(pCol->type)) { - spaceNeeded += sizeof(VarDataOffsetT) * maxPoints; + spaceNeeded += sizeof(VarDataOffsetT) * maxPoints + sizeof(VarDataLenT) * maxPoints; } if(pCol->spaceSize < spaceNeeded) { void* ptr = realloc(pCol->pData, spaceNeeded); -- GitLab