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

Fix crash when calling for invalid loadout index #764

Merged
merged 2 commits into from
Dec 1, 2023

Conversation

x3Karma
Copy link
Contributor

@x3Karma x3Karma commented Nov 30, 2023

Requesting for invalid loadout index using SwapSecondaryAndWeapon3PersistentLoadoutData will cause a crash. This PR just adds a check to reset the loadout index.

@GeckoEidechse GeckoEidechse added needs testing Changes from the PR still need to be tested needs code review Changes from PR still need to be reviewed in code labels Nov 30, 2023
@x3Karma
Copy link
Contributor Author

x3Karma commented Nov 30, 2023

Instead of resetting the index it just ignores the command now.

@Bobbyperson
Copy link
Contributor

Doesn't cause any issues on my server. Can't test if it fixes the crash exploit as I don't know how to do it.

@GeckoEidechse GeckoEidechse changed the title Fixed crash when calling for invalid loadout index Fix crash when calling for invalid loadout index Dec 1, 2023
Copy link
Member

@GeckoEidechse GeckoEidechse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed working in testing

Calling

SwapSecondaryAndWeapon3PersistentLoadoutData 12345

before this PR crashes the server with script error. After this PR the server no longer crashes.

The changes should be fine as far as I can tell.

@GeckoEidechse GeckoEidechse merged commit bdb73b1 into R2Northstar:main Dec 1, 2023
3 checks passed
@x3Karma x3Karma deleted the patch-1 branch February 13, 2024 06:52
@GeckoEidechse GeckoEidechse removed needs testing Changes from the PR still need to be tested needs code review Changes from PR still need to be reviewed in code labels Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants