fix: invalid read issue
This commit is contained in:
parent
25ae00632e
commit
a61f0533cf
|
@ -1566,21 +1566,21 @@ int32_t tDeserializeSGetUserAuthRspImpl(SDecoder *pDecoder, SGetUserAuthRsp *pRs
|
||||||
char db[TSDB_DB_FNAME_LEN] = {0};
|
char db[TSDB_DB_FNAME_LEN] = {0};
|
||||||
if (tDecodeCStrTo(pDecoder, db) < 0) return -1;
|
if (tDecodeCStrTo(pDecoder, db) < 0) return -1;
|
||||||
int32_t len = strlen(db);
|
int32_t len = strlen(db);
|
||||||
taosHashPut(pRsp->createdDbs, db, len, db, len);
|
taosHashPut(pRsp->createdDbs, db, len, db, len + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int32_t i = 0; i < numOfReadDbs; ++i) {
|
for (int32_t i = 0; i < numOfReadDbs; ++i) {
|
||||||
char db[TSDB_DB_FNAME_LEN] = {0};
|
char db[TSDB_DB_FNAME_LEN] = {0};
|
||||||
if (tDecodeCStrTo(pDecoder, db) < 0) return -1;
|
if (tDecodeCStrTo(pDecoder, db) < 0) return -1;
|
||||||
int32_t len = strlen(db);
|
int32_t len = strlen(db);
|
||||||
taosHashPut(pRsp->readDbs, db, len, db, len);
|
taosHashPut(pRsp->readDbs, db, len, db, len + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int32_t i = 0; i < numOfWriteDbs; ++i) {
|
for (int32_t i = 0; i < numOfWriteDbs; ++i) {
|
||||||
char db[TSDB_DB_FNAME_LEN] = {0};
|
char db[TSDB_DB_FNAME_LEN] = {0};
|
||||||
if (tDecodeCStrTo(pDecoder, db) < 0) return -1;
|
if (tDecodeCStrTo(pDecoder, db) < 0) return -1;
|
||||||
int32_t len = strlen(db);
|
int32_t len = strlen(db);
|
||||||
taosHashPut(pRsp->writeDbs, db, len, db, len);
|
taosHashPut(pRsp->writeDbs, db, len, db, len + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!tDecodeIsEnd(pDecoder)) {
|
if (!tDecodeIsEnd(pDecoder)) {
|
||||||
|
|
Loading…
Reference in New Issue