sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit 720313e185e0365a03f8bb648f8daad0e609d343
parent bf6ca69ae8c1149e6b6ae84f5ddc40639d1ff5a1
Author: Dominique Martinet <asmadeus@codewreck.org>
Date:   Fri,  8 Jun 2018 21:58:40 +0900

sway/criteria: gcc string truncation warning fix

Diffstat:
Msway/criteria.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sway/criteria.c b/sway/criteria.c @@ -472,7 +472,9 @@ struct criteria *criteria_parse(char *raw, char **error_arg) { ++head; } name = calloc(head - namestart + 1, 1); - strncpy(name, namestart, head - namestart); + if (head != namestart) { + strncpy(name, namestart, head - namestart); + } // Parse token value skip_spaces(&head); value = NULL;