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

Incorrect format specifier usage. #59

Open
ni4 opened this issue Jul 28, 2024 · 0 comments
Open

Incorrect format specifier usage. #59

ni4 opened this issue Jul 28, 2024 · 0 comments

Comments

@ni4
Copy link
Contributor

ni4 commented Jul 28, 2024

There is a bunch of places with code like
sexp_error(sexp_exception_t::error, "Declared length was %d, but quoted string ended too early", (int) length, 0, count);.
Later it goes to snprintf, however it would use type size_t for c1 and c2 (%zu), not the %d like it is specified in the format string. Also (int) length doesn't make sense here as parameter would be converted to size_t.

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

1 participant