Skip to content

[GEN][ZH] Prevent buffer overrun while writing to 'new_types', 'new_lensflares' in DazzleRenderObjClass #1111

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

Merged
merged 1 commit into from
Jun 21, 2025

Conversation

xezon
Copy link

@xezon xezon commented Jun 19, 2025

This change prevents buffer overrun while writing to 'new_types', 'new_lensflares' in DazzleRenderObjClass.

Dazzle is unused code, so this should be inconsequential for the game.

GeneralsMD\Code\Libraries\Source\WWVegas\WW3D2\dazzle.cpp(689): warning C6386: Buffer overrun while writing to 'new_types':  the writable size is 'new_count*4' bytes, but '8' bytes might be written.
GeneralsMD\Code\Libraries\Source\WWVegas\WW3D2\dazzle.cpp(713): warning C6386: Buffer overrun while writing to 'new_lensflares':  the writable size is 'new_count*4' bytes, but '8' bytes might be written.

@xezon xezon added Minor Severity: Minor < Major < Critical < Blocker Fix Is fixing something labels Jun 19, 2025
@xezon xezon force-pushed the xezon/staticanalysis2/023 branch from e65ea31 to ba9a78b Compare June 20, 2025 07:34
Copy link

@Mauller Mauller left a comment

Choose a reason for hiding this comment

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

Looks good.

@xezon xezon merged commit c8625ae into TheSuperHackers:main Jun 21, 2025
14 checks passed
@xezon xezon deleted the xezon/staticanalysis2/023 branch June 21, 2025 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fix Is fixing something Minor Severity: Minor < Major < Critical < Blocker
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants