mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
DiscIO: Don't keep volume pointer in DiscScrubber
Keeping the pointer creates use-after-free opportunities, and we don't have much reason to keep it around anyway.
This commit is contained in:
@ -29,7 +29,7 @@ public:
|
||||
DiscScrubber();
|
||||
~DiscScrubber();
|
||||
|
||||
bool SetupScrub(const Volume* disc);
|
||||
bool SetupScrub(const Volume& disc);
|
||||
|
||||
// Returns true if the specified 32 KiB block only contains unused data
|
||||
bool CanBlockBeScrubbed(u64 offset) const;
|
||||
@ -40,16 +40,15 @@ private:
|
||||
void MarkAsUsed(u64 offset, u64 size);
|
||||
void MarkAsUsedE(u64 partition_data_offset, u64 offset, u64 size);
|
||||
u64 ToClusterOffset(u64 offset) const;
|
||||
bool ReadFromVolume(u64 offset, u32& buffer, const Partition& partition);
|
||||
bool ReadFromVolume(u64 offset, u64& buffer, const Partition& partition);
|
||||
bool ParseDisc();
|
||||
bool ParsePartitionData(const Partition& partition);
|
||||
bool ReadFromVolume(const Volume& disc, u64 offset, u32& buffer, const Partition& partition);
|
||||
bool ReadFromVolume(const Volume& disc, u64 offset, u64& buffer, const Partition& partition);
|
||||
bool ParseDisc(const Volume& disc);
|
||||
bool ParsePartitionData(const Volume& disc, const Partition& partition);
|
||||
void ParseFileSystemData(u64 partition_data_offset, const FileInfo& directory);
|
||||
|
||||
const Volume* m_disc = nullptr;
|
||||
|
||||
std::vector<u8> m_free_table;
|
||||
u64 m_file_size = 0;
|
||||
bool m_has_wii_hashes = false;
|
||||
bool m_is_scrubbing = false;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user