forked from ShuriZma/suyu
submission_package: Ensure the 'extracted' member variable is always initialized
If an error occurs when constructing the PartitionFilesystem instance, the constructor would be exited early, which wouldn't initialize the extracted data member, making it possible for other code to perform an uninitialized read by calling the public IsExtractedType() member function. This prevents that.
This commit is contained in:
parent
ccf0a9cb38
commit
37ee05f7c0
|
@ -61,8 +61,6 @@ NSP::NSP(VirtualFile file_)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
extracted = false;
|
|
||||||
|
|
||||||
SetTicketKeys(files);
|
SetTicketKeys(files);
|
||||||
ReadNCAs(files);
|
ReadNCAs(files);
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,7 @@ private:
|
||||||
|
|
||||||
VirtualFile file;
|
VirtualFile file;
|
||||||
|
|
||||||
bool extracted;
|
bool extracted = false;
|
||||||
Loader::ResultStatus status;
|
Loader::ResultStatus status;
|
||||||
std::map<u64, Loader::ResultStatus> program_status;
|
std::map<u64, Loader::ResultStatus> program_status;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue