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

Enforce strict mode of jsmn. #985

Merged
merged 1 commit into from
Jul 12, 2019
Merged

Enforce strict mode of jsmn. #985

merged 1 commit into from
Jul 12, 2019

Conversation

stoeckmann
Copy link
Contributor

If no strict mode of jsmn is enforced, then the correct amount of
json elements would have to be checked to avoid segmentation faults
on malformed state files:

$ echo '{ "focusedMonitorId" }' > malformed-state
$ bspwm -s malformed-state
Segmentation fault
$ _

Signed-off-by: Tobias Stoeckmann [email protected]

If no strict mode of jsmn is enforced, then the correct amount of
json elements would have to be checked to avoid segmentation faults
on malformed state files:

$ echo '{ "focusedMonitorId" }' > malformed-state
$ bspwm -s malformed-state
Segmentation fault
$ _

Signed-off-by: Tobias Stoeckmann <[email protected]>
@stoeckmann
Copy link
Contributor Author

This alone won't fix the issue, because jsmn itself has a bug. See: zserge/jsmn#158

But after a merge of a new jsmn version this will fix the bspwm side of the issue.

@baskerville baskerville merged commit baa6a55 into baskerville:master Jul 12, 2019
@baskerville
Copy link
Owner

Thanks.

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

Successfully merging this pull request may close these issues.

2 participants