Merge pull request #1149 from csoler/v0.6-SecurityFixes

V0.6 security fixes
This commit is contained in:
csoler 2018-01-09 22:18:01 +01:00 committed by GitHub
commit 553ab93f07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View file

@ -2076,7 +2076,7 @@ bool RsGenExchange::processGrpMask(const RsGxsGroupId& grpId, ContentValue &grpC
// first find out which mask is involved // first find out which mask is involved
int32_t value, mask, currValue; int32_t value, mask, currValue;
std::string key; std::string key;
RsGxsGrpMetaData* grpMeta = NULL; const RsGxsGrpMetaData* grpMeta = NULL;
bool ok = false; bool ok = false;
RsGxsGrpMetaTemporaryMap grpMetaMap; RsGxsGrpMetaTemporaryMap grpMetaMap;
@ -2087,7 +2087,8 @@ bool RsGenExchange::processGrpMask(const RsGxsGroupId& grpId, ContentValue &grpC
if((mit = grpMetaMap.find(grpId)) != grpMetaMap.end()) if((mit = grpMetaMap.find(grpId)) != grpMetaMap.end())
{ {
const RsGxsGrpMetaData *grpMeta = mit->second; grpMeta = mit->second;
if (!grpMeta) if (!grpMeta)
{ {
#ifdef GEN_EXCH_DEBUG #ifdef GEN_EXCH_DEBUG

View file

@ -28,7 +28,8 @@
GroupMetaReq::~GroupMetaReq() GroupMetaReq::~GroupMetaReq()
{ {
rsstd::delete_all(mGroupMetaData.begin(), mGroupMetaData.end()); //rsstd::delete_all(mGroupMetaData.begin(), mGroupMetaData.end()); // now memory ownership is kept by the cache.
mGroupMetaData.clear();
} }
GroupDataReq::~GroupDataReq() GroupDataReq::~GroupDataReq()