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

swayimg segfaults when decoding /dev/zero or /dev/null #129

Closed
vursc opened this issue Apr 22, 2024 · 3 comments
Closed

swayimg segfaults when decoding /dev/zero or /dev/null #129

vursc opened this issue Apr 22, 2024 · 3 comments

Comments

@vursc
Copy link

vursc commented Apr 22, 2024

Steps to reproduce:

$ swayimg /dev/zero
Segmentation fault (core dumped)

$ swayimg /dev/null
Segmentation fault (core dumped)

I inspected the format-independent code for loading the image and found nothing suspicious, and suspect that it is some detect_<format>'s fault.

GDB list pointed to some nonexistent header file /usr/src/debug/gcc/gcc/libgcc/emutls.c. Not sure what this means.

(Zstd-compressed) core dumps: core_dumps.zip

@artemsen
Copy link
Owner

Just curious, why open /dev/null in swayimg?

@vursc
Copy link
Author

vursc commented Apr 23, 2024

Not really /dev/null... I accidentally opened an empty file (created by a faulty image format conversion). Thanks for the quick fix!

@vursc
Copy link
Author

vursc commented Apr 23, 2024

Just realized that /dev/zero has size zero... Should have noticed that earlier :P

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

No branches or pull requests

2 participants