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

Fix segfault caused by non-null-terminated string. #1504

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

falsifian
Copy link

I got the printf %.*s idea from xcb documentation somewhere but now I can't find it.

Fixes #1503

Hopefully this is the only case. I searched for xcb_ in the source and gave the results a cursory look.

I got the printf %.*s idea from xcb documentation somewhere but now I
can't find it.

Fixes baskerville#1503
@jvvv
Copy link
Contributor

jvvv commented Oct 6, 2024

This looks correct. For reference to the printf field width specifier, I found it in xcb_get_property_reply.3. If my memory serves me right, the xcb_icccm stuff are mainly wrappers around the xcb property and atom interface. The manual page mentions using the xcb_get_property_value* accessors, but this is actually done by xcb_icccm_get_wm_name.

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.

Segfault in _apply_name because xcb's strings aren't null-terminated
2 participants