fix: add more msg check
This commit is contained in:
parent
93dbe454d8
commit
a56c99daac
|
@ -211,6 +211,11 @@ static int32_t vnodePreProcessSubmitMsg(SVnode *pVnode, SRpcMsg *pMsg) {
|
|||
|
||||
SDecoder *pCoder = &(SDecoder){0};
|
||||
|
||||
if (((SSubmitReq2Msg *)pMsg->pCont)->version != 1) {
|
||||
code = TSDB_CODE_INVALID_MSG;
|
||||
TSDB_CHECK_CODE(code, lino, _exit);
|
||||
}
|
||||
|
||||
tDecoderInit(pCoder, (uint8_t *)pMsg->pCont + sizeof(SSubmitReq2Msg), pMsg->contLen - sizeof(SSubmitReq2Msg));
|
||||
|
||||
if (tStartDecode(pCoder) < 0) {
|
||||
|
@ -1218,6 +1223,11 @@ static int32_t vnodeProcessSubmitReq(SVnode *pVnode, int64_t version, void *pReq
|
|||
for (int32_t i = 0; i < TARRAY_SIZE(pSubmitReq->aSubmitTbData); ++i) {
|
||||
SSubmitTbData *pSubmitTbData = taosArrayGet(pSubmitReq->aSubmitTbData, i);
|
||||
|
||||
if (pSubmitTbData->pCreateTbReq && pSubmitTbData->pCreateTbReq->uid == 0) {
|
||||
code = TSDB_CODE_INVALID_MSG;
|
||||
goto _exit;
|
||||
}
|
||||
|
||||
if (pSubmitTbData->flags & SUBMIT_REQ_COLUMN_DATA_FORMAT) {
|
||||
if (TARRAY_SIZE(pSubmitTbData->aCol) <= 0) {
|
||||
code = TSDB_CODE_INVALID_MSG;
|
||||
|
|
Loading…
Reference in New Issue