aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authorM Stoeckl <code@mstoeckl.com>2019-01-19 10:31:55 -0500
committeremersion <contact@emersion.fr>2019-01-19 18:45:25 +0100
commit62260ab56e398aba81fef1a3b6d5f72d6aa6532d (patch)
treea7264e6676381ec9cc5dca6725d88e3257d9d0db /sway
parentafac6ced6e127d83503b39102eb8e0db6a9b1c13 (diff)
Fix backup methods in get_socketpath for IPC client
Previously, the success of `getline` was tested by checking if the buffer it allocates is nonempty and has a nonzero first byte. As `getline` does not explicitly zero out its memory buffer, this may fail (e.g., with AddressSanitizer). Instead, we check that at least one character was returned on standard output. Also, trailing newlines (if present) are now removed.
Diffstat (limited to 'sway')
0 files changed, 0 insertions, 0 deletions