-
-
Notifications
You must be signed in to change notification settings - Fork 761
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
Opening the help screen corrupts global variables #1768
Labels
Comments
r-darwish
changed the title
Opening the help screen causes a double free when quitting
Opening the help screen corrupts global variables
Nov 20, 2023
What's the size of |
I think we need to have a guard against crossing the length. |
I'll fix it soon and send a PR. |
N-R-K
added a commit
to N-R-K/nnn
that referenced
this issue
Nov 21, 2023
the size of g_buf depends on PATH_MAX and NAME_MAX which on certain platforms (such as mac) might not be big enough to decode the help string. use an explicit buffer with proper size instead. Closes: jarun#1768
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Environment details (Put
x
in the checkbox along with the information)nnn
master: yesExact steps to reproduce the issue
nnn
?
q
The problem occur here:
nnn/src/nnn.c
Lines 5175 to 5186 in 744a755
as
g_buf
isn't large enough to contain the entire help output, so it starts overriding the value in other global variablesThe text was updated successfully, but these errors were encountered: