fix bug
This commit is contained in:
parent
00c7966124
commit
7e1b2b7aad
|
@ -1087,9 +1087,12 @@ int32_t catalogGetExpiredUsers(SCatalog* pCtg, SUserAuthVersion **users, uint32_
|
||||||
uint32_t i = 0;
|
uint32_t i = 0;
|
||||||
SCtgUserAuth *pAuth = taosHashIterate(pCtg->userCache, NULL);
|
SCtgUserAuth *pAuth = taosHashIterate(pCtg->userCache, NULL);
|
||||||
while (pAuth != NULL) {
|
while (pAuth != NULL) {
|
||||||
void *key = taosHashGetKey(pAuth, NULL);
|
size_t len = 0;
|
||||||
strncpy((*users)[i].user, key, sizeof((*users)[i].user));
|
void *key = taosHashGetKey(pAuth, &len);
|
||||||
|
strncpy((*users)[i].user, key, len);
|
||||||
|
(*users)[i].user[len] = 0;
|
||||||
(*users)[i].version = pAuth->version;
|
(*users)[i].version = pAuth->version;
|
||||||
|
++i;
|
||||||
pAuth = taosHashIterate(pCtg->userCache, pAuth);
|
pAuth = taosHashIterate(pCtg->userCache, pAuth);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue