diff options
author | 2018-09-26 20:38:16 +0200 | |
---|---|---|
committer | 2018-09-26 20:38:16 +0200 | |
commit | 315b2bf100acc5a8095807763e5d838eed0c3e4f (patch) | |
tree | 64e0da2c9c189910a3f665e09b1c5ddcb18fe478 /swaybar/i3bar.c | |
parent | Make libpam optional (diff) | |
download | sway-315b2bf100acc5a8095807763e5d838eed0c3e4f.tar.gz sway-315b2bf100acc5a8095807763e5d838eed0c3e4f.tar.zst sway-315b2bf100acc5a8095807763e5d838eed0c3e4f.zip |
Replace getdelim to make swaybar work on FreeBSD
This commit fixes a segfault in swaybar on FreeBSD that was caused by
using getdelim with EOF as delimiter on an infinite stream. The FreeBSD
implementation handles the "no more data, delimiter not found, and EOF
not reached" scenario as an error, so it can't be used to read the
output of status command. This commit replaces the getline/getdelim
calls with reading all available data from the stream in one go.
Diffstat (limited to 'swaybar/i3bar.c')
0 files changed, 0 insertions, 0 deletions