Repository navigation
P1: Fix various crash potentials in table and mission parsing - #7907
Open
dustinspace217 wants to merge 1 commit into
Open
dustinspace217 wants to merge 1 commit into
dustinspace217 wants to merge 1 commit into
Conversation
Version-specific comment tags, length-limited quoted strings, mission variable names and indices, and loadout weapon descriptions are now kept within their buffers. Malformed input produces a warning; valid tables and missions load as before.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
A handful of small fixes in the table and mission parsers and the weapon loadout screen, where malformed text could crash the game.
Why?
A malformed table, mission or weapon description could crash the game while loading or on the loadout screen. Valid data behaves the same, apart from the two visible differences listed below.
How?
;;FSO x.y;;) without their closing semicolons are treated as ordinary comments.get_stringnow honors its length limit and stops cleanly at a missing closing quote or the end of the file, and the mission parser passes the buffer size where it reads into a fixed buffer.Testing?
Anything Else?
Two visible changes: a mission variable name longer than 31 characters is now cut with a warning (it used to stop the game with an error), and the fifth weapon description line now stays visible after the loadout text animation finishes (it used to disappear).
I used Claude Code to help find and test this.