Skip to content

fix(gta-core-five): sanitize vfx weapon impacts info#3562

Open
DaniGP17 wants to merge 1 commit into
citizenfx:masterfrom
DaniGP17:fix/sanitize-vfx-weapon-impact
Open

fix(gta-core-five): sanitize vfx weapon impacts info#3562
DaniGP17 wants to merge 1 commit into
citizenfx:masterfrom
DaniGP17:fix/sanitize-vfx-weapon-impact

Conversation

@DaniGP17
Copy link
Copy Markdown
Contributor

Goal of this PR

Prevent a crash that could occur in CDecalManager::AddWeaponImpact when a nullptr VfxWeaponInfo is passed due to invalid or unsupported material or weapon group data. This can be caused by bad actors.

Already tried with invalid VfxWeaponInfo data and just doesn't add the shooting decal.

How is this PR achieving the goal

Adding a jitasm patch to validate rsi register that is the one that store the VfxWeaponInfo

This PR applies to the following area(s)

FiveM

Successfully tested on

Game builds: 1604, 3407
Platforms: Windows, Linux

Checklist

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

Fixes issues

fixes #3560

@github-actions github-actions Bot added the triage Needs a preliminary assessment to determine the urgency and required action label Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage Needs a preliminary assessment to determine the urgency and required action

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Game crashed: GTA5_b3258.exe!sub_140DE5064 (0xce)

1 participant