fix invalid read

This commit is contained in:
Hongze Cheng 2022-01-04 08:29:05 +00:00
parent 1ddd99b6fc
commit a94487ab34
1 changed files with 2 additions and 2 deletions

View File

@ -382,8 +382,8 @@ static int metaCtbIdxCb(DB *pIdx, const DBT *pKey, const DBT *pValue, DBT *pSKey
// Second key is the first tag // Second key is the first tag
void *pTagVal = tdGetKVRowValOfCol(pTbCfg->ctbCfg.pTag, (kvRowColIdx(pTbCfg->ctbCfg.pTag))[0].colId); void *pTagVal = tdGetKVRowValOfCol(pTbCfg->ctbCfg.pTag, (kvRowColIdx(pTbCfg->ctbCfg.pTag))[0].colId);
pDbt[1].data = varDataVal(pTagVal); pDbt[1].data = pTagVal;
pDbt[1].size = varDataLen(pTagVal); pDbt[1].size = sizeof(int32_t);
// Set index key // Set index key
memset(pSKey, 0, sizeof(*pSKey)); memset(pSKey, 0, sizeof(*pSKey));