mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-14 22:40:06 +00:00
commit
30567a5909
@ -31,8 +31,8 @@ AesXtsStorage::AesXtsStorage(VirtualFile base, const void* key1, const void* key
|
|||||||
ASSERT(iv_size == IvSize);
|
ASSERT(iv_size == IvSize);
|
||||||
ASSERT(Common::IsAligned(m_block_size, AesBlockSize));
|
ASSERT(Common::IsAligned(m_block_size, AesBlockSize));
|
||||||
|
|
||||||
std::memcpy(m_key.data() + 0, key1, KeySize);
|
std::memcpy(m_key.data() + 0, key1, KeySize / 2);
|
||||||
std::memcpy(m_key.data() + 0x10, key2, KeySize);
|
std::memcpy(m_key.data() + 0x10, key2, KeySize / 2);
|
||||||
std::memcpy(m_iv.data(), iv, IvSize);
|
std::memcpy(m_iv.data(), iv, IvSize);
|
||||||
|
|
||||||
m_cipher.emplace(m_key, Core::Crypto::Mode::XTS);
|
m_cipher.emplace(m_key, Core::Crypto::Mode::XTS);
|
||||||
|
@ -93,13 +93,19 @@ ServerManager::~ServerManager() {
|
|||||||
m_threads.clear();
|
m_threads.clear();
|
||||||
|
|
||||||
// Clean up ports.
|
// Clean up ports.
|
||||||
for (auto it = m_servers.begin(); it != m_servers.end(); it = m_servers.erase(it)) {
|
auto port_it = m_servers.begin();
|
||||||
delete std::addressof(*it);
|
while (port_it != m_servers.end()) {
|
||||||
|
auto* const port = std::addressof(*port_it);
|
||||||
|
port_it = m_servers.erase(port_it);
|
||||||
|
delete port;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clean up sessions.
|
// Clean up sessions.
|
||||||
for (auto it = m_sessions.begin(); it != m_sessions.end(); it = m_sessions.erase(it)) {
|
auto session_it = m_sessions.begin();
|
||||||
delete std::addressof(*it);
|
while (session_it != m_sessions.end()) {
|
||||||
|
auto* const session = std::addressof(*session_it);
|
||||||
|
session_it = m_sessions.erase(session_it);
|
||||||
|
delete session;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Close wakeup event.
|
// Close wakeup event.
|
||||||
|
Loading…
Reference in New Issue
Block a user