diff --git a/src/mnode/src/mnodeTable.c b/src/mnode/src/mnodeTable.c index 82322d43b8efc2c921f678d1afed868968b7bf41..c7f8791d6de658fc21187de849945182f44840be 100644 --- a/src/mnode/src/mnodeTable.c +++ b/src/mnode/src/mnodeTable.c @@ -1989,7 +1989,7 @@ static int32_t mnodeAutoCreateChildTable(SMnodeMsg *pMsg) { pCreateMsg->getMeta = 1; pCreateMsg->contLen = htonl(contLen); - memcpy(pCreateMsg->schema, pTags, contLen); + memcpy(pCreateMsg->schema, pTags, contLen - sizeof(SCMCreateTableMsg)); mDebug("app:%p:%p, table:%s, start to create on demand, tagLen:%d stable:%s", pMsg->rpcMsg.ahandle, pMsg, pInfo->tableId, tagLen, pTags->name);