This commit is contained in:
hjxilinx 2019-11-12 18:05:47 +08:00
parent fa0f056f19
commit 907fcfa09c
1 changed files with 2 additions and 1 deletions

View File

@ -92,5 +92,6 @@ bool mgmtCheckIsMonitorDB(char *db, char *monitordb) {
char dbName[TSDB_DB_NAME_LEN + 1] = {0};
extractDBName(db, dbName);
return (strncasecmp(dbName, monitordb, strlen(dbName)) == 0);
size_t len = strlen(dbName);
return (strncasecmp(dbName, monitordb, len) == 0 && len == strlen(monitordb));
}