gonetz / GLideN64

A new generation, open-source graphics plugin for N64 emulators.
Other
770 stars 177 forks source link

Apply mask on DMEM address to avoid segmentation fault in Indiana Jones, #2631

Closed gonetz closed 2 years ago

gonetz commented 2 years ago

see #2628

gonetz commented 2 years ago

@fzurita I can't get the segmentation fault reported in #2628. Without it I don't know where to dig. So, I just added a mask to DMEM address to avoid out of bounds read in that particular place. So, user will get a wrong color instead of the crash. The plugin also will show an error message when this situation will happen for a first time. I hope that somebody will give us more details about that problem. Does it look ok to you?

fzurita commented 2 years ago

Yeah, that looks reasonable to me, with that mask it should be impossible to go above 0x2000 address offset. And hopefully users report the issue.

gonetz commented 2 years ago

TMEM, IMEM, DMEM have size of 4kb. It is unclear to me, why DMEM have 0x2000 limit in mupen64plus.