Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GL: fix segfault in GLGSRender::flip #15363

Merged
merged 2 commits into from
Mar 27, 2024
Merged

GL: fix segfault in GLGSRender::flip #15363

merged 2 commits into from
Mar 27, 2024

Conversation

Megamouse
Copy link
Contributor

It turns out that image_to_flip2 is nullptr in GLGSRender::flip, which then leads to a simple_array of size 2 and then images.map(FN...). It then tries to call xform with the dereferenced nullptr in simple_array::map.

So there's 3 potential bugs here:

  1. deref nullptr in map
  2. using a simple_array of size 2 even though image_to_flip2 is nullptr
  3. having a nullptr in image_to_flip2 in the first place

I tried to check the iterator for nullptr, but it seems to enter the scope and call xform anyway.
So we can just make sure not to call map with a nullptr in the first place.

fixes #15361

@Megamouse Megamouse merged commit afcfd81 into RPCS3:master Mar 27, 2024
6 checks passed
@Megamouse Megamouse deleted the glfix branch March 27, 2024 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Regression] Tales of Xillia crashes right before the game loads from the 2/26 update and on
2 participants