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

unsafe functions used to store error message #174

Open
ghost opened this issue Nov 1, 2023 · 0 comments
Open

unsafe functions used to store error message #174

ghost opened this issue Nov 1, 2023 · 0 comments

Comments

@ghost
Copy link

ghost commented Nov 1, 2023

The code uses strcpy to write data in an error buffer passed at runtime, but there is no way for the caller to know the buffer size that will be needed.
Using this feature is thus insecure, even if it can be worked around by using absurdly large buffers.

The strncpy function would require C99, same for memcpy. I do not know if C98 have any way of doing this safely.

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

0 participants