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

dwm-6.3 crash #12

Open
3BD-R opened this issue Aug 25, 2022 · 2 comments
Open

dwm-6.3 crash #12

3BD-R opened this issue Aug 25, 2022 · 2 comments
Assignees
Labels

Comments

@3BD-R
Copy link

3BD-R commented Aug 25, 2022

this patch is awesome thanks for your efforts,
the issue or bug is when miss typing one of ^ signs the wm crashes and log me out
example: xsetroot -name "^c#FF0000 example", I know it is wrong implementation but the result was crash

@fami-fish
Copy link

I have also discovered this whilst debugging my own DWM instance. Any imbalance with closing ^ cause the program to keep reading until a ^ is encountered, even if this means reading memory which is outside of the buffer, resulting in a segfault crash. A simple fix would be to check the number of ^ BEFORE the null char \0 at the end of stext and, if that number is odd, default to the original "dwm-"VERSION status text and perhaps log the error to stdout/stderr. This defaulting to the string is also seen when setting stext to "" (xsetroot -name "" so it should be consistent with other fixes. Ill make a pull request shortly once i have tested my implementation

@sipi
Copy link
Owner

sipi commented Aug 23, 2023

Hi,
@3BD-R Thanks you very much for your grateful thanks :)
and thanks for your feedback on issues.
I will check to implement the @nick-1666 fix as soon as possible.

best regards,

@sipi sipi added the bug label Aug 23, 2023
@sipi sipi self-assigned this Aug 23, 2023
@sipi sipi pinned this issue Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants