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

va_start() without va_end() #264

Open
smuehlst opened this issue Sep 28, 2022 · 1 comment
Open

va_start() without va_end() #264

smuehlst opened this issue Sep 28, 2022 · 1 comment

Comments

@smuehlst
Copy link

I stumbled over two places in the serialization code where va_start() is called without a corresponding call to va_end():


Is this intentional? According to my understanding of the C standard it is undefined behavior if va_end() is missing after va_start() has been called. See for example ISO/IEC 9899:TC3:

7.15.1 Variable argument list access macros
...
Each invocation of the va_start and va_copy macros shall be matched by a corresponding invocation of the va_end macro in the same function.
...
7.15.1.3 The va_end macro
...
If there is no corresponding invocation of the va_start or va_copy macro, or if the va_end macro is not invoked before the return, the behavior is undefined.

@SilverPlate3
Copy link
Contributor

@robertramey
Would you like me to create a pull request and fix this issue?

robertramey added a commit that referenced this issue Mar 23, 2024
Restore removed va_start calls; add missing va_end as reported in #264.
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

No branches or pull requests

2 participants