fix(tsdb/cache): fix buffer-overflow with column adding
This commit is contained in:
parent
4cac96d2df
commit
64378be7f4
|
@ -2745,6 +2745,13 @@ static int32_t mergeLastCid(tb_uid_t uid, STsdb *pTsdb, SArray **ppLastArray, SC
|
|||
break;
|
||||
}
|
||||
SLastCol *pCol = taosArrayGet(pColArray, iCol);
|
||||
if (slotIds[iCol] > pTSchema->numOfCols - 1) {
|
||||
if (!setNoneCol) {
|
||||
noneCol = iCol;
|
||||
setNoneCol = true;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (pCol->colVal.cid != pTSchema->columns[slotIds[iCol]].colId) {
|
||||
continue;
|
||||
}
|
||||
|
@ -2919,6 +2926,9 @@ static int32_t mergeLastRowCid(tb_uid_t uid, STsdb *pTsdb, SArray **ppLastArray,
|
|||
break;
|
||||
}
|
||||
SLastCol *pCol = taosArrayGet(pColArray, iCol);
|
||||
if (slotIds[iCol] > pTSchema->numOfCols - 1) {
|
||||
continue;
|
||||
}
|
||||
if (pCol->colVal.cid != pTSchema->columns[slotIds[iCol]].colId) {
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue