fivem icon indicating copy to clipboard operation
fivem copied to clipboard

fix(gta-core-five): validate archetype in manifold contact points

Open DaniGP17 opened this issue 6 months ago • 2 comments

Goal of this PR

Prevent a potential crash in phManifold::RefreshContactPoints caused by instanceB having a valid pointer but a null m_Archetype.

How is this PR achieving the goal

Replaces the original conditional jump (jz) with an unconditional jump (jmp) and redirects execution to a stub that performs both required null checks: one for instanceB itself, and another for instanceB->archetype. If either is null, execution is redirected to the failure handler (RemoveAllContacts); otherwise, normal execution continues.

This PR applies to the following area(s)

FiveM

Successfully tested on

Game builds: 1604, 3407

Platforms: Windows

Checklist

  • [x] Code compiles and has been tested successfully.
  • [x] Code explains itself well and/or is documented.
  • [x] My commit message explains what the changes do and what they are for.
  • [x] No extra compilation warnings are added by these changes.

Fixes issues

fixes #3466

DaniGP17 avatar Jun 24 '25 14:06 DaniGP17

Any news on when this will be pulled? We are still stricken with this crash that has the ability to crash the whole server if they are near for an event or something similar

IMCraytex avatar Aug 29 '25 22:08 IMCraytex

We're still waiting on this, really hoping the CFX Team merge it!

ThatMaddLadd avatar Nov 25 '25 17:11 ThatMaddLadd