mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-27 15:35:29 +03:00
Correctly set size in CtrEncryptedBacking
This bug caused crashes with the improved error checking.
This commit is contained in:
parent
5f942e2dff
commit
00d0586d1f
@ -6,7 +6,7 @@
|
||||
namespace skyline::vfs {
|
||||
constexpr size_t SectorSize{0x10};
|
||||
|
||||
CtrEncryptedBacking::CtrEncryptedBacking(crypto::KeyStore::Key128 ctr, crypto::KeyStore::Key128 key, std::shared_ptr<Backing> backing, size_t baseOffset) : Backing({true, false, false}), ctr(ctr), cipher(key, MBEDTLS_CIPHER_AES_128_CTR), backing(std::move(backing)), baseOffset(baseOffset) {
|
||||
CtrEncryptedBacking::CtrEncryptedBacking(crypto::KeyStore::Key128 ctr, crypto::KeyStore::Key128 key, std::shared_ptr<Backing> backing, size_t baseOffset) : Backing({true, false, false}, backing->size), ctr(ctr), cipher(key, MBEDTLS_CIPHER_AES_128_CTR), backing(std::move(backing)), baseOffset(baseOffset) {
|
||||
if (mode.write || mode.append)
|
||||
throw exception("Cannot open a CtrEncryptedBacking as writable");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user