use len of context buffer

This commit is contained in:
54liuyao 2024-10-29 14:14:26 +08:00
parent 9a68dc53bf
commit fc2e62a18c
1 changed files with 1 additions and 1 deletions

View File

@ -2032,7 +2032,7 @@ static EDealRes getDBNameFromConditionWalker(SNode* pNode, void* pContext) {
SValueNode* node = (SValueNode*)pNode; SValueNode* node = (SValueNode*)pNode;
char* dbName = nodesGetValueFromNode(node); char* dbName = nodesGetValueFromNode(node);
tstrncpy((char*)pContext, varDataVal(dbName), varDataLen(dbName) + 1); tstrncpy((char*)pContext, varDataVal(dbName), TSDB_DB_NAME_LEN);
return DEAL_RES_END; // stop walk return DEAL_RES_END; // stop walk
} }
default: default: