[td-1373]

This commit is contained in:
Haojun Liao 2020-10-23 12:45:17 +08:00
parent 204ba970f1
commit 7582b7e4df
1 changed files with 5 additions and 2 deletions

View File

@ -152,7 +152,10 @@ void tVariantAssign(tVariant *pDst, const tVariant *pSrc) {
len = len * TSDB_NCHAR_SIZE; len = len * TSDB_NCHAR_SIZE;
} }
pDst->pz = calloc(1, len); char* p = realloc(pDst->pz, len);
assert(p);
memset(pDst->pz, 0, len);
memcpy(pDst->pz, pSrc->pz, len); memcpy(pDst->pz, pSrc->pz, len);
return; return;
} }