From dfba595cdcc9cc1b450ce4a7524a82944ce98569 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Sat, 16 Apr 2022 12:28:40 -0700 Subject: [PATCH] fs: fix null check in AesXtsStorageExternal --- .../source/fssystem/fssystem_aes_xts_storage_external.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/libstratosphere/source/fssystem/fssystem_aes_xts_storage_external.cpp b/libraries/libstratosphere/source/fssystem/fssystem_aes_xts_storage_external.cpp index 922c5c96e..4f9a45fd2 100644 --- a/libraries/libstratosphere/source/fssystem/fssystem_aes_xts_storage_external.cpp +++ b/libraries/libstratosphere/source/fssystem/fssystem_aes_xts_storage_external.cpp @@ -111,7 +111,7 @@ namespace ams::fssystem { R_UNLESS(buffer != nullptr, fs::ResultNullptrArgument()); /* Ensure we can encrypt. */ - R_UNLESS(m_decrypt_function != nullptr, fs::ResultNullptrArgument()); + R_UNLESS(m_encrypt_function != nullptr, fs::ResultNullptrArgument()); /* We can only write at block aligned offsets. */ R_UNLESS(util::IsAligned(offset, AesBlockSize), fs::ResultInvalidArgument());