-
Notifications
You must be signed in to change notification settings - Fork 777
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
SIGABRT and calloc failure in parse_file() #5002
Comments
Thanks for the report. Indeed we should not crash, but just to point it out, we do not support nested variables names. |
zhrvn
pushed a commit
to zhrvn/i3
that referenced
this issue
Jun 9, 2022
Fixes i3#5002 If there is a variable with the same name as the rest of another variable after removing $, then it will be counted twice. Therefore, we need to completely replace it in order to correctly calculate the length of a new string.
zhrvn
pushed a commit
to zhrvn/i3
that referenced
this issue
Jun 9, 2022
zhrvn
pushed a commit
to zhrvn/i3
that referenced
this issue
Jun 9, 2022
zhrvn
pushed a commit
to zhrvn/i3
that referenced
this issue
Jun 10, 2022
If there is a variable with the same name as the rest of another variable after removing $, then it will be counted twice. Therefore, we need to completely replace it with spaces (variable names cannot contain spaces) in order to correctly calculate the length of a new string.
zhrvn
pushed a commit
to zhrvn/i3
that referenced
this issue
Jun 10, 2022
If there is a variable with the same name as the rest of another variable after removing $, then it will be counted twice. Therefore, we need to completely replace it with spaces (variable names cannot contain spaces) in order to correctly calculate the length of a new string.
zhrvn
pushed a commit
to zhrvn/i3
that referenced
this issue
Jun 10, 2022
If there is a variable with the same name as the rest of another variable after removing $, then it will be counted twice. Therefore, we need to completely replace it with spaces (variable names cannot contain spaces) in order to correctly calculate the length of a new string.
stapelberg
added a commit
that referenced
this issue
Sep 12, 2022
Count extra_bytes correctly If there is a variable with the same name as the rest of another variable after removing $, then it will be counted twice. Therefore, we need to completely replace it with spaces (variable names cannot contain spaces) in order to correctly calculate the length of a new string. fixes #5002 Co-authored-by: Ivan Zharov <zhiv.email@gmail.com> Co-authored-by: Michael Stapelberg <stapelberg@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm submitting a…
Current Behavior
Using a config with nested variables (see config) causes i3 to crash either with a heap allocation failure (in calloc) or SIGABRT (heap smashing).
Expected Behavior
Using a config with nested variables (see config) doesn't cause i3 to crash.
Reproduction Instructions
Start i3 with the following configs.
Environment
Output of
i3 --moreversion 2>&-
:Config file causing allocation failure
Config file causing SIGABRT
The text was updated successfully, but these errors were encountered: