Loading src/gpo.cpp +2 −3 Changes for src/gpo.cpp: 2 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -62,7 +62,6 @@ void authdb::GpoData::setAllowed(Allow &allowed){ char *data=new char[uidsize+sizeof(size_t)]; memset(data,0,uidsize+sizeof(size_t)); std::copy(&allowed.count,&allowed.count+sizeof(size_t),data); if(allowed.count>0){ for(size_t i=0; i<allowed.count; ++i){ std::copy( reinterpret_cast<char*>(&allowed.uid[i]), Loading @@ -70,7 +69,7 @@ void authdb::GpoData::setAllowed(Allow &allowed){ data+((sizeof(uuid_t)*i)+sizeof(size_t)) ); } } setAuthData<const char>(DataType::PolicyData,StorageType::BinaryStorage,this,&_Allowed,"gpoallowed",data,uidsize+sizeof(size_t)); delete[] data; Loading @@ -88,7 +87,7 @@ void authdb::GpoData::getAlowed(Allow &allowed){ allowed.uid=new uuid_t[allowed.count]; uuid_t *start = reinterpret_cast<uuid_t*>(_Allowed->data+sizeof(size_t)); for(size_t i =0; i<allowed.count; ++i){ uuid_copy(allowed.uid[i],*(start+(sizeof(uuid_t)*i))); uuid_copy(allowed.uid[i],start[i]); } } Loading Loading
src/gpo.cpp +2 −3 Changes for src/gpo.cpp: 2 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -62,7 +62,6 @@ void authdb::GpoData::setAllowed(Allow &allowed){ char *data=new char[uidsize+sizeof(size_t)]; memset(data,0,uidsize+sizeof(size_t)); std::copy(&allowed.count,&allowed.count+sizeof(size_t),data); if(allowed.count>0){ for(size_t i=0; i<allowed.count; ++i){ std::copy( reinterpret_cast<char*>(&allowed.uid[i]), Loading @@ -70,7 +69,7 @@ void authdb::GpoData::setAllowed(Allow &allowed){ data+((sizeof(uuid_t)*i)+sizeof(size_t)) ); } } setAuthData<const char>(DataType::PolicyData,StorageType::BinaryStorage,this,&_Allowed,"gpoallowed",data,uidsize+sizeof(size_t)); delete[] data; Loading @@ -88,7 +87,7 @@ void authdb::GpoData::getAlowed(Allow &allowed){ allowed.uid=new uuid_t[allowed.count]; uuid_t *start = reinterpret_cast<uuid_t*>(_Allowed->data+sizeof(size_t)); for(size_t i =0; i<allowed.count; ++i){ uuid_copy(allowed.uid[i],*(start+(sizeof(uuid_t)*i))); uuid_copy(allowed.uid[i],start[i]); } } Loading