diff options
| author | David Marcec <dmarcecguzman@gmail.com> | 2018-08-11 10:35:47 +1000 |
|---|---|---|
| committer | David Marcec <dmarcecguzman@gmail.com> | 2018-08-11 10:35:47 +1000 |
| commit | b76ddb7647cbb390cce4143d91a1db171b0fa503 (patch) | |
| tree | a6e2e334e82b035923c41458150604dd5fb31d65 /src/core/file_sys/content_archive.cpp | |
| parent | 2a3b335b156552515e28f62df2617d06c241a29a (diff) | |
| parent | 0a003efde4b86c235355d11c93f5d315bdb4728d (diff) | |
Merge remote-tracking branch 'origin/master' into better-account
Diffstat (limited to 'src/core/file_sys/content_archive.cpp')
| -rw-r--r-- | src/core/file_sys/content_archive.cpp | 4 |
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 3529166ac..d3007d981 100644 --- a/src/core/file_sys/content_archive.cpp +++ b/src/core/file_sys/content_archive.cpp @@ -170,6 +170,10 @@ VirtualFile NCA::Decrypt(NCASectionHeader s_header, VirtualFile in, u64 starting } 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."); |
