安全规范告警

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
+5 -1
View File
@@ -471,7 +471,11 @@ uint32_t ResourcePack::HandleLabel(vector<ResourceItem> &items, ConfigParser &co
idName = it.GetName() + "_entry";
it.SetName(idName);
string data(reinterpret_cast<const char *>(it.GetData()));
if (!it.SetData(reinterpret_cast<const int8_t *>(data.c_str()), it.GetDataLength()-1)) {
if (it.GetDataLength() - 1 < 0) {
return RESTOOL_ERROR;
}
if (!it.SetData(reinterpret_cast<const int8_t *>(data.c_str()),
static_cast<uint32_t>(it.GetDataLength() - 1))) {
return RESTOOL_ERROR;
}
if (nextId <= 0) {