mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-07-11 09:34:26 +02:00
d35fe1b78b
This makes us savestate the NAND using the same APIs the guest uses instead of directly touching the host files. This solves several problems: * If the user loaded a malicious savestate, it could use path traversal to overwrite arbitrary files on the host file system. (Reported by MrSynAckster.) * Metadata (UID, GID, attribute, modes) wasn't being savestated. * NAND redirects weren't handled, except for NAND redirects at the root of where the savestate was being done. (This only possibly matters if TASing a Riivolution patch. The root of the savestate is at /tmp when not TASing, and the only case where we do a NAND redirect is inside /title if requested by a Riivolution patch.)