diff --git a/src/mnode/src/mnodeTable.c b/src/mnode/src/mnodeTable.c index 4e9c64057567e54e73af31c0662c698fbcd71e59..de37b0934539a512630c008fc1b1245104dd7483 100644 --- a/src/mnode/src/mnodeTable.c +++ b/src/mnode/src/mnodeTable.c @@ -2381,6 +2381,12 @@ static int32_t mnodeDoGetChildTableMeta(SMnodeMsg *pMsg, STableMetaMsg *pMeta) { static int32_t mnodeAutoCreateChildTable(SMnodeMsg *pMsg) { STableInfoMsg *pInfo = pMsg->rpcMsg.pCont; + if (pMsg->rpcMsg.contLen <= sizeof(*pInfo)) { + mError("msg:%p, app:%p table:%s, failed to auto create child table, tags not exist", pMsg, pMsg->rpcMsg.ahandle, + pInfo->tableId); + return TSDB_CODE_MND_TAG_NOT_EXIST; + } + char* p = pInfo->tags; int32_t nameLen = htonl(*(int32_t*) p); p += sizeof(int32_t);