diff options
author | Dominique Martinet <asmadeus@codewreck.org> | 2018-07-01 22:46:48 +0900 |
---|---|---|
committer | Dominique Martinet <asmadeus@codewreck.org> | 2018-07-02 08:03:41 +0900 |
commit | c78ab67877e15e4bbbdfd4e8bb7f94309980489b (patch) | |
tree | 8811560930cc848dee2044aa729e4060c10e75e0 /sway/commands/bar | |
parent | 9c9ee3e4ef9d4e57ec801a79e0b2da1bd2a6d46e (diff) |
workspace_next_name: fix string length for ws_num >= 100
The check didn't include && ws_num < 100 so l would always be 1 or 2
Instead of fixing logic it's simpler to just call snprintf twice to get
length and use that.
Also change malloc failure check to sway_assert because both callers of
this function do not do null check and would segfault...
Found through static analysis.
Diffstat (limited to 'sway/commands/bar')
0 files changed, 0 insertions, 0 deletions