安全规范告警

Signed-off-by: fangyunzhong <fangyunzhong2@huawei.com>
This commit is contained in:
fangyunzhong
2024-04-16 17:02:39 +08:00
parent 1d2ee3c7ca
commit 40cb8239ed
13 changed files with 69 additions and 22 deletions
+2 -2
View File
@@ -38,10 +38,10 @@ public:
private:
int64_t GenerateAppId(ResType resType, const std::string &name);
int64_t GenerateSysId(ResType resType, const std::string &name);
int64_t GetMaxId(int64_t startId) const;
uint64_t GetMaxId(uint64_t startId) const;
int64_t GetCurId();
int64_t appId_;
int64_t maxId_;
uint64_t maxId_;
ResourceIdCluster type_;
std::map<std::pair<ResType, std::string>, int64_t> ids_;
std::map<std::pair<ResType, std::string>, ResourceId> sysDefinedIds_;
+1 -1
View File
@@ -48,7 +48,7 @@ private:
void ReleaseData();
void CopyFrom(const ResourceItem &other);
int8_t *data_ = nullptr;
uint32_t dataLen_;
uint32_t dataLen_ = 0;
std::string name_;
std::vector<KeyParam> keyparams_;
ResType type_;
+4 -4
View File
@@ -74,12 +74,12 @@ private:
void SaveLimitKeyConfigs(const std::map<std::string, LimitKeyConfig> &limitKeyConfigs,
std::ostringstream &out) const;
void SaveIdSets(const std::map<std::string, IdSet> &idSets, std::ostringstream &out) const;
bool ReadFileHeader(std::ifstream &in, IndexHeader &indexHeader, int64_t &pos, int64_t length) const;
bool ReadFileHeader(std::ifstream &in, IndexHeader &indexHeader, uint64_t &pos, int64_t length) const;
bool ReadLimitKeys(std::ifstream &in, std::map<int64_t, std::vector<KeyParam>> &limitKeys,
uint32_t count, int64_t &pos, int64_t length) const;
uint32_t count, uint64_t &pos, int64_t length) const;
bool ReadIdTables(std::ifstream &in, std::map<int64_t, std::pair<int64_t, int64_t>> &datas,
uint32_t count, int64_t &pos, int64_t length) const;
bool ReadDataRecordPrepare(std::ifstream &in, RecordItem &record, int64_t &pos, int64_t length) const;
uint32_t count, uint64_t &pos, int64_t length) const;
bool ReadDataRecordPrepare(std::ifstream &in, RecordItem &record, uint64_t &pos, int64_t length) const;
bool ReadDataRecordStart(std::ifstream &in, RecordItem &record,
const std::map<int64_t, std::vector<KeyParam>> &limitKeys,
const std::map<int64_t, std::pair<int64_t, int64_t>> &datas,