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 #625 #638

Merged
merged 1 commit into from
Dec 2, 2021
Merged

fix #625 #638

merged 1 commit into from
Dec 2, 2021

Conversation

Cyan4973
Copy link
Owner

@Cyan4973 Cyan4973 commented Dec 1, 2021

PVS Studio static analyzer doesn't like that the structure is not entirely initialized.
This was intentional, and supposed to allow, in some future, to reduce the size of the state,
while minimizing impact with library's installed based (in case of version mismatch).

This is way too complex and risky for such a tiny benefit.
So revert to the classical "init everything" method, which should please PVS Studio.
The last member will remain "reserved" and unused.
Who knows, maybe in some future, it may be of some use, for some purpose yet to determine.

Fix #625, reported by @kcgen .

PVS Studio static analyzer doesn't like that the structure is not entirely initialized.
This was supposed to allow, in some future, to reduce the size of the state,
while minimizing impact with library's installed based (in case of version mismatch).

This is way too complex and risky for such a tiny benefit.
So revert to the classical "init everything" method, which should please PVS Studio.
The last member will remain "reserved" and unused.
Who knows, maybe in some future, it may be of some use, for some purpose yet to determine.
@kcgen
Copy link
Contributor

kcgen commented Dec 2, 2021

Rescan in progress.

@kcgen
Copy link
Contributor

kcgen commented Dec 2, 2021

Confirmed good! pvs-analysis-report.zip

@Cyan4973 Cyan4973 merged commit 0caf2e8 into dev Dec 2, 2021
@Cyan4973 Cyan4973 deleted the fix625 branch July 20, 2023 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0.8.1: PVS Studio flagged buffer underflows in the state reset functions
2 participants