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

death_anims.cpp: Use appropriate buffer sizes #7

Conversation

clayne
Copy link
Contributor

@clayne clayne commented Aug 12, 2023

  • rnd_motion::setup: Due to a lack of safety in _CopyVal (fixed separately) the string64 buffer can easily be overrun. Extend this to 1024 to be in line with the expected max length of a line. Also add an assertion and clean up the magic number stuff (1023).
* rnd_motion::setup: Due to a lack of safety in _CopyVal (fixed
  separately) the string64 buffer can easily be overrun. Extend this to
  1024 to be in line with the expected max length of a line. Also add an
  assertion and clean up the magic number stuff (1023).
@clayne
Copy link
Contributor Author

clayne commented Aug 12, 2023

This was discovered by a build with stack safety checking enabling and a mod that errantly assumed it could use / separated values for random_death_animations. The code was trying to copy a 79 byte value into a 64 byte buffer due to a problem with _CopyVal outlined here: #6

image

image

@clayne clayne changed the base branch from vs2022 to all-in-one-vs2022 August 12, 2023 06:10
@themrdemonized themrdemonized merged commit a35699d into themrdemonized:all-in-one-vs2022 Aug 12, 2023
themrdemonized added a commit that referenced this pull request Aug 12, 2023
death_anims.cpp: Use appropriate buffer sizes

(cherry picked from commit a35699d)
(cherry picked from commit 05983dc)
themrdemonized added a commit that referenced this pull request Aug 12, 2023
death_anims.cpp: Use appropriate buffer sizes

(cherry picked from commit a35699d)
@clayne clayne deleted the 1691818478-death-anims-fixes branch August 19, 2023 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants