wheremyfoodat / Panda3DS

HLE 3DS emulator
https://panda3ds.com/
GNU General Public License v3.0
787 stars 56 forks source link

[CRO] Fix faulty data relocations #497

Closed PSI-Rockin closed 2 months ago

PSI-Rockin commented 2 months ago

The old code based the data pointer used for data relocations off the buffer passed by the application. This is incorrect - the old data segment offset needs to be based upon the start of the CRO file. As a result, data relocations were written to the wrong addresses, potentially causing a crash.

Fixes the NULL pointer crash in ORAS. It likely fixes other crashes in games that use CROs, but this PR needs more testing.

eepykami commented 2 months ago

pokemon

wheremyfoodat commented 2 months ago

pokemon

PSI-Rockin commented 2 months ago

pokemon

Ishan09811 commented 2 months ago

pokemon

patataofcourse commented 2 months ago

forkemon