-
Notifications
You must be signed in to change notification settings - Fork 379
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
out of bound access #4636
Comments
this is about:
It looks like the problem is fixed with the suggested small workaround. |
sergepetrenko
added a commit
that referenced
this issue
Nov 25, 2019
snrpintf always null-terminates the passed string, and it also returns the number of bytes that "would have been written if there was enough space", so not only we don't have to null-terminate the string, but even more so we shouldn't do it erroneously. Closes #4636
sergepetrenko
added a commit
that referenced
this issue
Nov 26, 2019
snrpintf always null-terminates the passed string, and it also returns the number of bytes that "would have been written if there was enough space", so not only we don't have to null-terminate the string, but even more so we shouldn't do it erroneously. The only case when a string should be null-terminated manually is when the print cycle doesn't run at all, so move the termination before the cycle. Closes #4636
kyukhin
pushed a commit
that referenced
this issue
Dec 10, 2019
snrpintf always null-terminates the passed string, and it also returns the number of bytes that "would have been written if there was enough space", so not only we don't have to null-terminate the string, but even more so we shouldn't do it erroneously. The only case when a string should be null-terminated manually is when the print cycle doesn't run at all, so move the termination before the cycle. Closes #4636 (cherry picked from commit 2066f29)
kyukhin
pushed a commit
that referenced
this issue
Dec 10, 2019
snrpintf always null-terminates the passed string, and it also returns the number of bytes that "would have been written if there was enough space", so not only we don't have to null-terminate the string, but even more so we shouldn't do it erroneously. The only case when a string should be null-terminated manually is when the print cycle doesn't run at all, so move the termination before the cycle. Closes #4636 (cherry picked from commit 2066f29)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tarantool/src/lib/core/backtrace.cc
Line 176 in 9fba29a
snprintf man:
(p > end ? *end : *p) = '\0';
? Or reallocate and adapt the code to capture all the output in.The text was updated successfully, but these errors were encountered: