mirror of https://github.com/mgba-emu/mgba.git
Core: Fix potential UAF when loading a ROM in a VDir
This commit is contained in:
parent
ddee0af216
commit
9b98a19a37
|
@ -127,6 +127,7 @@ struct mCore* mCoreFind(const char* path) {
|
|||
}
|
||||
|
||||
bool mCoreLoadFile(struct mCore* core, const char* path) {
|
||||
core->unloadROM(core);
|
||||
#ifdef FIXED_ROM_BUFFER
|
||||
return mCorePreloadFile(core, path);
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue