fivem icon indicating copy to clipboard operation
fivem copied to clipboard

Clamp marker type index in FiveM

Open Disquse opened this issue 3 months ago • 0 comments

Goal of this PR

Using an invalid marker type index will cause an OOB crash. This PR is meant to fix this issue.

How is this PR achieving the goal

By replacing the original native handler with one that includes marker type index checks.

This PR applies to the following area(s)

FiveM, Natives

Successfully tested on

Game builds: 1604, 2060, 2189, 2372, 2545, 2612, 2699, 2802, 2944, 3095

Platforms: Windows, Linux

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

Addresses the problem reported in this forum topic: https://forum.cfx.re/t/drawmarker-causing-crash-when-you-enter-a-string-as-type-instead-of-a-integer/5236598

Disquse avatar May 26 '24 11:05 Disquse