summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/content_archive.cpp
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-08-07 05:13:37 +0200
committerZach Hilman <zachhilman@gmail.com>2018-08-07 05:13:42 +0200
commit91cfe70301bec23099ae27ad70e3da525a573cfe (patch)
treefa8fbde6661373f7d835f814b09f54f132b99aeb /src/core/file_sys/content_archive.cpp
parentFix missing qjpeg DLL (diff)
downloadyuzu-91cfe70301bec23099ae27ad70e3da525a573cfe.tar
yuzu-91cfe70301bec23099ae27ad70e3da525a573cfe.tar.gz
yuzu-91cfe70301bec23099ae27ad70e3da525a573cfe.tar.bz2
yuzu-91cfe70301bec23099ae27ad70e3da525a573cfe.tar.lz
yuzu-91cfe70301bec23099ae27ad70e3da525a573cfe.tar.xz
yuzu-91cfe70301bec23099ae27ad70e3da525a573cfe.tar.zst
yuzu-91cfe70301bec23099ae27ad70e3da525a573cfe.zip
Diffstat (limited to 'src/core/file_sys/content_archive.cpp')
-rw-r--r--src/core/file_sys/content_archive.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/file_sys/content_archive.cpp b/src/core/file_sys/content_archive.cpp
index 79e70f6ef..8cd1f5e6a 100644
--- a/src/core/file_sys/content_archive.cpp
+++ b/src/core/file_sys/content_archive.cpp
@@ -140,6 +140,10 @@ VirtualFile NCA::Decrypt(NCASectionHeader header, VirtualFile in, u64 starting_o
}
NCA::NCA(VirtualFile file_) : file(std::move(file_)) {
+ if (file == nullptr) {
+ status = Loader::ResultStatus::ErrorInvalidFormat;
+ return;
+ }
if (sizeof(NCAHeader) != file->ReadObject(&header))
LOG_ERROR(Loader, "File reader errored out during header read.");