[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

@ -151,8 +151,11 @@ void tVariantAssign(tVariant *pDst, const tVariant *pSrc) {
if (pSrc->nType == TSDB_DATA_TYPE_NCHAR) { if (pSrc->nType == TSDB_DATA_TYPE_NCHAR) {
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;
} }