aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/xdg_shell.c
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-02-05 14:13:27 -0500
committerLibravatar Drew DeVault <sir@cmpwn.com>2019-02-11 10:22:53 -0500
commitd4e49a49ebea61b2e078a494eb94f02b03a6a1cf (patch)
tree1f073eead802b2db385f1986373dcabd1171a00e /sway/desktop/xdg_shell.c
parentInitialize server so input manager is available. (diff)
downloadsway-d4e49a49ebea61b2e078a494eb94f02b03a6a1cf.tar.gz
sway-d4e49a49ebea61b2e078a494eb94f02b03a6a1cf.tar.zst
sway-d4e49a49ebea61b2e078a494eb94f02b03a6a1cf.zip
output_cmd_background: fix no file + valid mode
If output_cmd_background is given a valid mode as the first argument, then there is no file given and an error should be returned. join_args should not be called with an argc of zero since it sets the last character to the null terminator. With an argc of zero, the length is zero causing a heap buffer overflow when setting the byte before the start of argv to '\0'. This probably will not ever generate a segfault, but may cause data corruption to whatever is directly before it in memory. To make other such cases easier to detect, this also adds a sway_assert in join_args when argc is zero.
Diffstat (limited to 'sway/desktop/xdg_shell.c')
0 files changed, 0 insertions, 0 deletions